They were banned from talking about any sort of politics in the internal chats, not outside. That is something It was consider basic work polite behavior until very recently. Ironically, now that many people only can see some topics as "good vs evil", is when it is needed the most.
Do you get paid to discuss political beliefs at work, likely via channels provided to you by your employer? In most western countries, it is in fact against the law to misuse the company's resources for private reasons. Unless your employer lets you, which is fine and very common these days, yet not a right nevertheless.
Is it acceptable for you to start a political discussion, for example on anti-china sentiment, in your company’s main channel? Has anything like that happened before in your work?
It was handed down by public announcement with zero discussion or warning.
If my boss pulled nonsense like that I would consider quitting too.