Will that be in the UK, the EU, or outside?
You should ask Lamal in Olten directly, or your insurance. Do report back, please.
This is from the official Swiss Gvt site
Health insurance: Students abroad
Barring exceptional circumstances, students who go abroad to study retain their domicile in Switzerland and thus remain subject to compulsory health insurance (KVG).
Studying in an EU/EFTA member state
Students who retain their domicile in Switzerland during their stay in the EU/EFTA remain subject to compulsory health insurance (KVG) provided that they do not exercise a remunerated activity alongside their studies (in this case, please consult “Workers in the EU or EFTA).
Under the European Regulations on the coordination of social security systems, in order to avoid double insurance, students who remain insured under their home country’s health insurance scheme are not obliged to obtain health insurance in the country where they are studying.
Being insured under the Health Insurance Act (KVG), upon presentation of the European Health Insurance Card, students are entitled to receive the same medical care as persons insured in the European country in question (for reimbursement of treatment costs in EU/EFTA countries, please consult “Tourists abroad and globetrotters”).
Studying outside the EU/EFTA
Students who retain their domicile in Switzerland while studying in a country outside the EU/EFTA remain subject to compulsory health insurance in Switzerland (for reimbursement of treatment costs in non-EU/EFTA countries, please consult “Tourists abroad and globetrotters”).
You might find some of the discussion on this thread helpful:
A few years back (2016-17), our children were in boarding school in the UK. When we went for our B permit renewal we were asked how many days the children were spending in Switzerland and it was pointed out that if they were not in CH for 180 days per year they could technically be denied renewal of their B permit, and they would note the file for our next renewal.
At the next renewal date, we were indeed asked for documentation of how many days each child had spent in Switzerland during the prior year. At that point, however, we were due to leave shortly thereafter and the issue died. The idea that the children could potentially have been denied residence permits because they attend boarding school was an important part of our decision to leave, but not the only reason -- so we didn't really pursue whether there were potential workarounds.
This was in Kanton Zurich.
It all seemed somewhat irrelevant at the time, but I don't know what we would have done at the start of Covid if we (the parents) were resident in CH with no right of entry to the UK and the kids were at boarding school in the UK with no right of entry into CH.
I'd suggest talking to your local authorities before having the issue emerge at permit renewal...