F1 STEM OPT to H4 when H1B lottery is picked and waiting for client

Hello. My wife was laid off on F1 STEM OPT in February. Her H1B lottery was picked this year (3rd lottery final attempt through consultancy). She is waiting to receive her client offer letter (pay, location etc) for past 25days. Her consultancy employer has until June 30th to file/send her H1B petition to USCIS. However, her OPT unemployment grace period of 150days ends on July 15th. And because of current market, there is a chance her client may pullback offer. So we want to apply for H4 COS. Our concerns are -

. If she applies for H4 COS, and then gets client offer, can her consultancy proceed with filing H1B while H4 COS is pending? Are we allowed to revoke H4 COS?

. Can my wife stay in US while her H4 COS is pending but her F1 STEM OPT unemployment period ends?

H1B Visa F1, F2 Visas - CPT - OPT H4 Visa