I have the Talent Passport as an employee, and my first company went under. I was lucky to find another job before quitting, but generally, there is no obligation to "leave France immediately".
Also, if you've worked for at least 6 months in the past 2 years and your company went under / you got fired / the company did not renew your CDD (temporary contract) / you had to quit because your SO is moving, you're given unemployment benefits (whether you're French or not) as well as help to get back to employment.
Maybe not immediately, but I believe in the US if you lose your job and you are not a US citizen or Permanent Resident, you have 90 days to either get a new job and a visa to go with it or leave the country. How do these things work in France?