H1B Transfer when H4 Extension Pending

I have current H1B approved until 2023 and My spouse H4 extension petition is pending with USCIS for 4-Months (her i94 already expired) .

At this time, I got an offer with New employer and he is ready to file H1B transfer in Premium and H4 extension petition as well.

Once my H1B transfer Approved in Premium with my New Employer and another new H4 Petition is going to be pending.

And if I resign my OLD employer will withdraw my H1B and as a result will the Old H4 Pending petition (filed by old employer) will also get automatically withdrawn / denied / chance for RFE ? will it be considered Out of Status for Spouse (H4) ?

Since My new Employer already filled another H4 petition and i would be having a new receipt notice in hand with that can my spouse stay in USA (is it considered a legal stay) no matter whatever happens to the Old H4 Petition (filed by OLD employer) ?

Whoever been in similar situation of doing H1B Transfer while H4 is in Pending Please help

Most probably you will recieve RFE asking proof for H1B status of primary. You can provide the copy of approval notice for H1B with new employer.
Any unlawful presence starts from the date of denial if underlying I-94 has expired.

Yes, this is considered period of authorized stay while the petition is pending.