1) They buyout the shares. If they don’t want to do that then…
2) Sell the company.
If either of these can’t happen the company is dead and everyone parts ways. It’s as simple as that. No free rides here.
3) You keep the shares and hope for the best outcome. (If they don’t want you to then go back to 1 or 2)z