So if TikTok was not earning any profit from US (for example, if it was sponsored by the govt), there would be no commerce and it would not be banned? I do not believe that.
Profit is not the standard for the regulation of commerce in the United States though.
When the federal government set limits on crop production with the Constitution's Interstate Commerce Clause as its justification, Roscoe Filburn was simply growing wheat over the limit to feed his farm animals. That wheat was never sold, and it never crossed the property line to leave his farm, much less crossed state lines. The government still fined him and he lost his case in SCOTUS establishing precedent in Wickard v. Filburn, because it affected the market prices of wheat, despite the miniscule impact.
The same could be said of TikTok even if it doesn't earn a penny in profit.
What is the nature of that commerce? I don't think you can ablate the 1A concerns this easily.
(Note that I am sympathetic to the idea that TikTok is a source of foreign influence. But it's not clear to me what precedent allows the US congress to control their ownership without doing the same to every "US" corporation that's incorporated in Ireland.)