Changing job on H1B while spouse's H4 and EAD are pending

Hello,

I am on H1B and my visa is approved until 04/2028 (company A). My spouse H4 and EAD are still pending (company A)

I have an offer where the company (company B) is filing H1 in premium along with H4 and EAD for my spouse. If the H4 and EAD with company B does not get approved right away, and in next few weeks H4 and EAD with company A gets approved (may be after I leave company A). Can my spouse work based on approval of EAD that was filed when I was with company A? EAD for spouse is expired at this time. H4 and EAD with company A was filed around 210 days ago and still pending.

Yes, if H4 EAD gets approved, you can use it.
H4 Or EAD is not tied to any company.

Thanks for the prompt response.