I think that this instance does have to be handled with care. There are numerous issues to consider about this. On the surface it may be easy to react to say that is an over reaction however in combat as has been mentioned the medication issue is one issue.
But there are numerous real and everyday scenarios where this would be a major concern to treat someone who states they are female as if they are female.
Either the military would have to state that everyone has to be treated as their sex or they have to have a blanket ban. I actually cannot see a workable middle ground. So, if a male person joined and accepted that they were treated as male for every purpose that counts (physical and medical considerations, accommodation, toilets and showers, etc) then maybe that will work.
For instance. How would this work in the Navy when already there is limited space on board? No third options are available.
But I don’t believe that it is workable for any person in the military to be forced to use ‘preferred’ pronouns etc either. That in and of itself leaves a huge scope for abuse towards anyone who slips up.
Would any person who had a transgender identity agree to those conditions? Even more importantly, would the military be allowed to have those conditions?