I've thought a bit about this article and here's the important points of the story that I see, with an analysis at the end:

1. He used to be a student at the swiss university (call it SGU)
2. His research is about climate change, he goes to china to do his PhD and further his knowledge and study of it, falls in love with a Chinese girlfriend (he's anonymous in the article because of, according to him, repercussions by the Chinese government on the family of his girlfriend, which makes sense because when he tweeted critically about china she told him she was scared)
3. having started his PhD at SGU, he still had a "supervisory relationship" with someone there (she used this wording when she took distance from him)
4. He went to Switzerland to visit family, and was stuck there for Covid reasons. He thought of creating a twitter account to talk about china and asked his swiss supervisor whether it would be a bad idea, and whether she self-censors herself. She did not reply. He then started tweeting against China, thinking he'd be fine because he's in Switzerland.
5. Now, he receives an email from his supervisor, saying she received "angry e-mails from china" and that she might not be able to get a visa for entering china (which her research benefits from). He then deactivates his Twitter account and asks her who sent the e-mails, which gets him no replies. Two days later, another e-mail from her says she is "terminating" her supervisory relationship with him. Some short time later his account is deleted from SGU's online system, and he does not appear on the SGU website as a PhD student.
6. His dad contacts lawyers, the journal writing the article contacts the university, and their official stand is that his relationship with the supervisor was informal, and that his account was deleted simply because he unenrolled from the university a while ago so that he could spend more time in China to finish his PhD (otherwise, the max number of years allowed by SGU to do a PhD might be exceeded). He was unable to re-enrol to SGU because he did not have a suitable supervisor anymore.
7. The supervisor, when contacted by the journal, said that the "angry e-mails from China" were one student from Canada saying one of the guy's tweets was racist (it depicted a yellow-skin, exaggerated slanted-eyed caricature and was a retweet). She said that tweet was the only reason for her actions. To that, the student said he should not have retweeted that cartoon, but that he did it only for the political message it was trying to say, which was apparently concerning the oppression of Taiwan and other countries by China. She also said he had "lost his temper" in a conversation a year earlier, which eroded her trust for him. The article says there is no hint of tension in their e-mails.

So, I understand all the comments pointing out that it's fair that he's treated that way, given the tweets he made and the fact that he was technically only a student at the Chinese university. However there's a few points in this story that stand out to me.
- Firstly, the university called the relationship between the student and the supervisor "informal". There's something strange about that, because if she was an informal supervisor acting only from her personal accord, then how would his personal tweets affect her ability to get a visa? There should in fact not be much of a link between them if he's not a student of the university.
- Secondly, if it really was one student from Canada complaining about his one tweet, how could it affect her visa? Especially if he takes them down, as he did right when she reported it to him.
- Thirdly, if it was only that one racist tweet that motivated her actions, it would surprise me that she would not ask him to take it down.

In conclusion, I see a few possibilities. It could be that the supervisor didn't like him anymore after the tweets, and decided she didn't want to work with him anymore, and then he was trapped by the decision to unenroll to go beyond the PhD year limit. Or it could be that the supervisor was under pressure by other people's e-mails (Chinese university officials) that warned her of consequences.
Given that this university has the most agreements with Chinese universities of all Switzerland, my view on this would depend on how trustable the journalist is. The article sounds a lot like he's being clear and making sense, and the supervisor and university are using technicalities and lack of clarity to make obscure (to us) decisions.