.
>> “When you join the military you are subject to the UCMJ. The UCMJ restricts constitutional rights, such as free speech...” <<
Then the UCMJ is utterly null and void!
Congress lacks the power to unilaterally nullify the constitution.
.
You are being ridiculous. When you sign the dotted line you literally give your life to the government. They make promises to feed, clothe, shelter, train and provide medical care. You promise to do what you are told.
That’s it.
If a person decides to not do what they are told then they face the consquences of thier actions. Nothing more, nothing less. This has nothing to do with religion or freedom of speech or constitutional rights.