Is H4 EAD valid after H1B extension is approved?

My wife’s H1B extension was denied, so she moved to H4 + EAD, got H4 Visa stamped and entered country on H4 visa. After that her new petition for H1B extension got approved from the date her H1B was set to be expire, and the I797 came with a new i94 record number.

Does that invalidate her H4 status and automatically move her back to H1B?

If it was filed as Change of Status and there was a New I-94, it is very likely. USCIS goes by the last action rule. So, technically she may be in H1B status now.
You need to discuss with your attorney immediately and then clarify so that you maintain the right status…