One loses the permit upon departure ( there are exceptions, such as obtaining prior permission to be "absent" ).
CH citizenship is at three levels:
Parish ( Commune / Gemeinde ) - they ask the Canton to provide you with a permit
Cantonal eg Zürich - they issue a Cantonal permit, B, C etc.
and finally at Federal level - they issue your Swiss ID / passport
Each Gemeinde and Canton have varying rules.
You might be keen in reading up several threads on CH citizenship, like this one:
how to become swiss citizen?