It’s very much individual cases as you have to apply for an exemption before you can cancel your Swiss health insurance. If you can’t get it then you have to continue paying the insurance regardless.
I find it incredibly stupid that when we move back to the UK one or both of us may still need to pay Swiss health insurance even though we both contributed while we lived/worked in the UK and as UK nationals and residents the National Health Service is supposed to be free for us.