An employer-linked aka „Closed B“ does not allow you to find another Swiss employer. If you want to continue work in Switzerland, your future employer needs to sponsor a new closed B permit - aka an exception approval and and thereby proof that they can’t recruit adequate resources from within Switzerland or the EU. That is very unlikely to happen.
To make things even worse - closed B‘s can only be renewed after a „cool-down period“ of 12 months. So the new employer would first need to recruit you outside of Switzerland. From there, you could then after 6 months or so come to extended business travel to Switzerland and after 1 year return. This as such employment outside of Switzerland would then allow for a re-transfer back to Switzerland (and a new Closed B), on the grounds that you were a critical Manager (expert likely won‘t work). Have seen such cases but they generally only work out if your new employer poaches you from your current employer. Chances to engineer this once fired are virtually zero - unless your client internalizes you (assuming you work in the IT services industry).
I am afraid but the brutal truth is that you probably need to Pack up stuff and leave to a European Country or even back home. Poland is probably a good country for such cases I understand. To make it even worse - no Visa that allows to work in Switzerland means no possibility to find new job in Switzerland and based on this no entitlement to unemployment benefits as you can’t be re-employed by RAV…
All my Personal understanding. Have worked in this industry for a long time so I trust my understanding should still be 80% correct. But given the negative impact, I would recommend to re-confirm it with your former employers HR and/or RAV. Long term learning: never ever again accept a Closed B visa, unless they are willing to (and have an audit trail of) successfully sponsoring closed B to open B permits. But given closes B is close to slavery and gives employers material monetary and sanctionary benefits - you won‘t find many employers that are willing to do so I am afraid so next time, I would carefully think before taking up such offer the next time.