That's true but incomplete, 2ndDiv. As a retired military chaplain, most of America doesn't realize that a military chaplain must be recertified annually by his/her denomination.
If they are not, then they are removed from service as a chaplain. Nor can they simply switch denoninations. They must simultaneously have both their losing denomination and their gaining denomination approve of their retention.
Of course, so long as they are on duty status they are at the direction of the officers appointed over them.
My denomination, for example, officially rejects marrying homosexuals. While some United Methodists might do it on the sly, they would not have that luxury in the military in which all would have to be above board by law.
I was just reminding those here who never served in uniform or those who did but didn’t have much interaction with the chaplaincy that the chaplains are actually in the military, not some sort of adjunct or civilian outsourced clergy. Many may not realize that they are under the orders of the president, just like an officer of the line.