I think in a democratic society we accept certain structures and laws. If the government declares a group an enemy of the state, then I think it’s fair to comply with that law. Making your own laws is not though.
However, just the other day there was hooplah about GitHub not allowing access from Iran. So it’s like people want to eat their cake and also have it.
China is not declared a foreign enemy by law and yet the US government is actively using banning and sanctioning their otherwise legally operating companies. If they're not a foreign enemy, do they not have rights in the US?
This whole thing is only shades of grey. Pretending it is black and white makes an honest conversation about it impossible.
So while not an enemy, they do engage in anticompetitive activities and we should counter them.
Now that becomes complicated when you deal with authoritarian regimes whose local laws may significantly violate international law (severe human rights violations, etc).
But that’s only half the deal. The other are the one sided onerous and coercive terms applied to foreign/international companies.
There are two main possibilities of why Google almost pulled out completely from China. One was safeguarding IP, the other is that at the time they cared a bit more about their ideals.
It might be different if Twitter had a monopoly on social networks, but that's not the case.