If your I-94 card has expired and you are working in the "extension period", you have to remain in the country until it is approved.
You can only extend status if you are in that status. Once you leave the country you are not in h-1b status but rather no status at all. If you are in no status then you cannot extend. USCIS if they come to know and it seems like they have access to whether you are out of the country or not would wind up denying the extension but approve the h-1 without I-94 card, which would cause you to go for visa stamping.
Please note if you are beyond your six years some of the service centers position is that you have to be within your six years h-1b to extend. If you are off h-1b and six years has expired then they will not give the extra year. Therefore, if you are considered off h-1b then they may not approve h-1 at all; with or without i-94.
However, if you have advance parole and ead and your 140 is approved you won't be severly impacted.