The US government could buy out Musk, keep the company public while owning a majority of the shares and do nothing with them unless the company does something incredibly stupid.
That's also how Europe does it and its even worse then the US. And China rockets aren't all that impressive.
Also, the US has little history of this and the history it does have is utterly terrible. Go look up the performance of US own weapons factories threw history, basically just a long list of failure that lead to real issues in wars.
The US does not need to own the company to be able to prevent them doing something they don't want.
That's how China does it.