H4 to H1 fy 2021 CAP change of status

My wife’s h4 expires 7/30. We already fileD for h4 extension and its in pending status. In the meantime her h1 got picked in lottery and submitted it last week in premium. Waiting for the result. If h1 is approved it will start from 10/1.

  1. If both h1 and h4 are approved before 10/1 i am assuming she will continue to be in h4 from 7/30 to 9/30 and automatuically move to h1 starting 10/1. Is this right?
  2. If h4 is not approved by 7/30 but h1 is approved before 7/30, will she be considered out of status 7/30-9/30?
  3. If h1 is approved but h4 gets only approved after 10/1, will she move into h4 automatically? How do i avoid that?

Thank you in advance.

This is slightly tricky with timing as there is last action rule that kicks in.
Whichever comes last from USCIS will stand. You would need to write to USCIS and withdraw your H4 at some point to avoid issues. I suggest you discuss this with your attorney and plan it out.
Do update here after you discuss with attorney and how it goes for community benefit.

You may read below for idea on process to withdraw.