F2 COS denied, H4 COS is still pending

Hi Kumar,

I was on F1 visa until October 1st 2020. I have H1B since then.
My wife was on J1 Visa until May 1st 2020.

We applied COS to F2 for my wife on April 2020.
Applied COS to H4 for her in September 2020 because my visa changed.

She gave fingerprint for F2 COS and H4 COS both in November 2020.

In January 2021, USCIS send a RFE for F2 COS asking that my F1 status is expired. Our lawyers replied the RFE by sending my H1B and her H4 COS pending application documents.

USCIS denied her F2 in March 2021. Her H4 COS is still pending. Fingerprints are done.

All this mess happened because USCIS took long time to process F2 COS.
Is the time between May 1st and October 1st for my wife is considered as unlawful presence?
Can this affect her H4 COS application?
What is the best option to avoid any issues in the future?