If history has anything to say, courts find very creative ways to allow otherwise baseless laws to stand when national security is in question (which is really why Tik Took is even being singled out in the first place). The question comes down to whether the judges believe that TikTok represents a legitimate threat of propaganda to the US to warrant the action.
I agree in part, but this is a think a couple of steps too far. Many allowances are made for security, but I'm not sure this is in fact justified by actual security concerns.
There's also too large a mass of objections. If they actually decide in favour of the government I can't see how this will not mess up basically all US law. Essentially, if this goes, then anything goes.
It'd have to be the strangest judgement in the world.