You’d need to talk to your commune/gemeinde about whether they’d allow you to freeze your permit or not. Usual reasons for doing so are because your employer sends you on assignment to another country, study abroad, etc. Leaving your job and getting a new one abroad could make it tricky.
Thank you Medea. I was planning to definitely ask. The above question was in the light that my permit can be frozen. If not, I will just leave Switzerland.