It may take a long time to be fully litigated, but the courts also take a while to act, and we've seen that this administration takes full advantage of this fact. The odds are also stacked against Elon here because the national security interests would likely make a compelling argument to stay any injunctions SpaceX might seek. SpaceX might prevail in the end, but the whole process would get very uncomfortable for Elon in the meantime.
Actually the defense production act provides a perfectly viable path actually supported by law to ensure that the governments interests are served.
An injunction would be entirely logical as it prevents irreparable harm based on a fanciful understanding of the law unlikely to prevail and hurts the government not at all.
Certainly the government trying to steal like a common criminal puts anyone in an uncomfortable position but the only real risk is the fact we live under incipient fascism.