time off between two employers

Thanks everyone in advance - If I have my I797 with the new employer already, and I will terminate my current job today and travel outside the US for 2 months, renew my visa stamp in my home country, and come back to US to work for the new employer, is this allowed? Will I run into any issues at the consulate because I am not on payroll when applying for visa stamp?

Thanks so much! Much appreciated.

Is this first time H1? If so, you can return only after Oct 1.

If it was just extn and transfer, you can return anytime and start working after stamping