Google left China because they didn't want to play by China's rules. Whatever their motivations, I'm glad google stood up to them, but we're not even accusing China of refusing to follow any particular US law. I don't think the US getting our own version of the Great Firewall of China is a good thing.
And TikTok is free to leave if they don't want to play by our rules that companies with large numbers of American users can't be substantially owned or controlled by a foreign adversary and still do business with US companies.