There's no law against it, so it's certainly not illegal. But you should inform your employer about it to ensure that your accident insurance is still valid, particularly if you're travelling outside CH, and then it's up to them whether they allow it or not. When I was in a similar situation my employer had no problem with it, but yours may have a different policy.
I also did some paid work, as a ski instructor, while I was off sick, and again, it was a question of getting them to accept it.
Of course, if you don't inform them they've realistically no way of finding out, but tread carefully.
Also check your contract and general employee rules and don't just trust what we say here. My employer does not allow holiday while on a 100% medical certificate. Their reasoning is that if you're well enough to go on holiday then you're well enough to show up to the office, at least some of the time.
Thankfully, my employer, Roche, were willing to accept that holidays and other activities were part of the healing process, but yes, the key point is to understand the specific employment conditions and then act accordingly (even if you choose to ignore them).
Well that's ridiculous ... especially if it's 1, a mental health related illness exacerbated by being at work or 2, you have a physical job that an injury prevents you doing, but doesn't prevent you sitting on the beach!
The general idea is that if you can travel and sit on the beach that you can also do replacement work at the company, even if only sorting papers for half the day.
Also check with your company ́s insurance, often salary is paid by the company for a limited time (in case of illness) and then the insurance takes over.
It is worthwile to check this out OP as not adhering to any policy from your company can worst case lead to being dismissed (and you really do not need that now).
Bumping up an old thread as the topic is interesting. OP requesting 6 months is hardly acceptable but now I’m wondering should the doctor or employer be informed if the employee is out of Switzerland for a few days and can they find out?