The internal property is called gender.
The internal property is called gender.
What is gender, in the sense of an internal property? How do we detect it?
If you think that gender dysphoria is rooted in delusion, you should probably read into it. There's a reason trans people aren't treated the same as people with anorexia or schizophrenia - it's because trans people are normative outside of being trans. It's the same kind of situation as being gay.
Trans people are, and I'm generalizing here, people who feel their biology doesn't match up with the gender role they identify with. They often then want to align their physical presentation with that associated with the gender role, on the belief that societal roles are more important than biology. (It's very transhumanist, in a sense.)
I'll note a fairly easy example of sex and gender differing even in our society, which is intersex people. I.e. those whose physical expression lies somewhere between male or female (which isn't super-common, but certainly happens). They're ambiguous physically, and we historically make them pick (or pick for them at birth) what gender role they'll perform.