H4 cos and H4 EAD

Hello, can I apply H1B to H4 COS along with H4EAD from outside USA on my spouse’s i140(currently Perm is in progress and hoping to get i140 approved). Currently I am on H1B employed in USA and maxing out on Aug 2021, so will have to move out.
If not then Pls suggest what are my options?