The most important aspect of the military is discipline. Orders have to be followed, without question. Orders are given by those in authority over you, your chain of command. Everyone must learn their chain of command. At all bases, on all ships, in all commands, the same person is always at the top of your chain of command, The President of the United States. He may be your president, but for military personnel, he is first their Commander.
Do you give up your “freedom of speech”?, yes you do. More accurately put, you give up your “freedom”. It isn't “taken” from you, you give it up, willingly. It's a necessary part of the contract.
Without discipline, all the technology, weapons, strategies,
would be worthless. While you are under the president's command, keep your mouth shut OR be prepared to suffer the consequences.
While you are under the president's command, keep your mouth shut OR be prepared to suffer the consequences. And that, apparently, applies to talking heads, Congress and the SCOTUS. Everyone is now under the resident's command.