My H1B sponsor just went under. Can I still switch back to F1 and stay in the U.S.?

Hey everyone,
So… my worst fear just became real. The startup that sponsored my H1B just collapsed last week. I was selected in the lottery last year, got my approval, started working… and now I’m basically unemployed on H1B.

I’ve heard people say you can “switch back” to F1 if you find a school fast enough. Is that actually doable? Would I have to leave the U.S. to do that? I’m not super keen on flying back home and risking a visa denial.

Also — if I go back to F1 and find another job later, do I get a second shot at H1B or am I screwed because I’ve already used mine?

Would love to hear from anyone who’s gone through this. What’s the actual timeline I should expect? And is CPT still a thing if you already had H1B once?