So even though h1b folks pay into the system they cannot claim unemployment.
It’s not that hard to stay for extended periods to either settle affairs or find another job.
"An alien admitted or otherwise provided status in E-1, E-2, E-3, H-1B, H-1B1, L-1, O-1 or TN classification and his or her dependents shall not be considered to have failed to maintain nonimmigrant status solely on the basis of a cessation of the employment on which the alien's classification was based, for up to 60 consecutive days or until the end of the authorized validity period, whichever is shorter, once during each authorized validity period. DHS may eliminate or shorten this 60-day period as a matter of discretion. Unless otherwise authorized under 8 CFR 274a.12, the alien may not work during such a period."
This is also what I've been told by my company's lawyers.
If you get fired/company folds/etc. then I think the 60 days things holds.
The I-485 would have to be rejected, or, you lose your job after the I-485 is filed. Even then if you maintain yourself for 6 months after the I-485 was filed and your employer doesn't withdraw the approved I-140, you can find a new job under AC21; or get lucky with no interview request or RFE.
The pain point is that you won't be able to travel after I-485 filing until your Advanced Parole turns up and you'll depend on EADs if you want to change jobs under AC21.
You could have your Green Card before you even win the H1-B lottery.