This constant conflation of speech rules and trade rules is tiresome.
If it was just about content then yes, it'd be unconstitutional.
But security/trade concerns about a geopolitical opponent are not the same thing, have never been the same thing, and it would be crazy to treat them as the same thing.
Not to mention that as a trade issue, China already bans basically all the popular American social media sites, and just a ton of popular US sites in general. Turnabout is entirely fair play and expected when it comes to trade.