H1 extensiton with approved I-140

Background : My I-797 Expiry is Jan 15,2024 and I-94 is Jan 25,2024
PERM filled but as on today not received and once get approval immediately plan to file I-140 in premium.


If PERM and I-140 will get approved before Jan 15,2024 but in worst scenario not getting enough time to file H1 extension in premium, so in that case my question is may I use grace period until Jan 25,2024 for filling H1 extension and avoid leaving country or no and If yes, I am not out of status, correct?

Please advise and suggest if any alternate path to avoid leaving country.