Note that the recent case involved a crime in France.
So really, it's more like 'unless you commit a crime in a country that cooperates with Switzerland and the Swiss legal system decides to hand in a request'
Their actions were illegal in Switzerland too. As much as I can criticize France's recent actions against protesters, in this case, it's the Swiss justice system that ultimately decided to comply with the request.
Yeah, I understand that it was illegal in Switzerland, and the Swiss authority was not a passive participant, but your wording 'unless you commit a crime in Switzerland' implies that the crime itself is committed in Switzerland, not that it could be an action contrary to Swiss law in any cooperating country.
So really, it's more like 'unless you commit a crime in a country that cooperates with Switzerland and the Swiss legal system decides to hand in a request'