Maybe this person does a really good job. Being nuts doesn’t mean incompetence, though being on hormones the body was never meant to be on is bound to affect one’s judgement. But they lack evidence of such until they try dealing with it for a while.
Recruiting may be so weak in recent years that they can’t just take the cream of the crop but rather have to accept whatever floats in. Most of the officers grew up watching Klinger on MASH and most of those they’re enlisting now grew up on Star Trek, so eccentricity is not the recruiting turnoff it once was. In the new anything goes normal the old Hornblower normal may be considered disruptive and undesirable.
If you're disconnected enough from reality that you believe you're a woman even though your chromosomes are XY and your anatomy matches that genotype, I don't want you on my ship. Perhaps you don't want to believe that a large region of rapid, exothermic oxidation is a fire that needs to be reported, or that the compartment unexpectedly being converted into a swimming pool is an issue that we call "flooding". If you cannot immediately accept reality over your personal whims, you cannot respond properly to the many emergencies that navy ships in general (and my ships in particular) experienced.