H4 - H1B COS using visa stamp at US embassy

Hi ,
The article on this website clearly explains the process for H4-H1B COS and vice versa.
my question is inline with H4 -->H1B status change.

My current status is H4 and have H4 EAD (Valid until 11/02/2020)and currently employed.
My Employer has filed H1B COS (New H1B - CAP )with start date of 10/01/2020.
If we file H4/H4 EAD as well now …

if H4 approval date > H1B approval date = H1B will be my final status .

if H1 approval date > H4 approval date = withdraw H4 application .if we could not withdrew the H4 application on time and H4 /H4 EAD is also approved , H4 is my final status , in this case , My attorney is saying continue working on H4/H4EAD status, when you go out of the country apply H1B stamping ,with the i797 of H1B and and thus your status will be changed when you enter US with a H1B visa . is this true ? and is this process similar to how we apply for H1B at any US consulate ? any exception /clause which can lead to a problem in changing the status ? Thank you.

Yes, your attorney has given the correct advice.

When you go out of US, you need a valid US visa stamp to return to USA. This visa stamp can either be H1B or H4 as per your choice.

A follow up question on the situation:
Uscis is yet to make decision on my H1B case , i-94 expires on Nov2nd 2020 .
I have not filled H4/H4EAD application yet .
Lets assume that i file h4 petition now and still waiting for H1 petition result , on nov3rd ill be out of status , so what happens to my h1 petition , will uscis just make decision or will ask for h4 to be approved first ?to prove my status ?