H1b work with previous employer

Was working with Employer A. In last Oct I transferred to Employer B (full time) came to India and got my visa stampede with Employer B until 2024. Currently i am in India working for Employer B now i want to resign Employer B and move to Employer A. Can i resign while i am in India? and Employer A still holds my valid H1b until 2023 he did not withdraw my application yet, Can i use my Employer A H1b at port of entry to re enter into US

I already replied to your question on other forum.

You may resign while in India however to reenter you must use the new I-797 from employer A that you will receive after it is approved.
Best is to not resign while in India, enter the US on employer B I-797 and then do a change of employer to employer A.

Thanks for quick response. After entering US on Employer B i-797 do i need to transfer my h1b to Employer A or i can start working for Employer A with the old H1b which is valid until 2023

Employer A will need to file a change of employer aka transfer petition.

Can i keep my transfer while i am in India or it is best to keep it after going to USA.

Best approach is start the transfer once you come back from India.