This is not correct. If you leave/lose your job, you have a 60-day grace period where you're not considered out of status. You need to find a new employer willing to petition a new I-129 for you.
Please check the specifics with a lawyer. Immigrations laws keep changing in very subtle ways.
not to be glib, but this would be a one-way trip for the near to mid future. Any rquirement to leave and return to the country is also a non starter
L1 - if you lose your job and you have no other status (ie have not filed for green card or have your H1B), that's it. You have to leave within 60 days and you cannot work at another company in the US.
H1B - you can switch to a new company and they port your H1B with USCIS. Otherwise, 60 day grace period to leave.
Adjustment of Status to 485 - if it has been pending with USCIS for more than 180 days & you have your EAD, you can port to another company under the AC-21 act.