From a psychiatric perspective, people arrive at a trans identity for a number of different reasons. Some persist, and some move onto acceptance of their own embodied reality.
There is no evidence for something innate, some inner essence of the opposite sex called “being trans”. It is not verifiable by any external tests or scans.
It is an identity arrived at in the face of psychic pain and distress, but just because a person believes the source of their distress is because they are “really” the opposite sex to their body doesn’t make this literally true. It might, however, be the least uncomfortable way to live for them, a decision that should be taken after puberty, but it doesn’t mean they are actually the opposite sex.
This is just divorced from material reality, and it isn’t realistic to expect to go through the world disassociated from your own body to the extent that you expect every stranger you meet to read you as the opposite sex. That just won’t happen, the external world cannot be controlled to that extent, and it is not psychologically healthy to rely on constant external validation for your sense of identity.
Framing it as an immutable “fact” that a person’s sex is defined by their inner identity and not their body is just post-modernism.