The biology of sex/gender is a really complex thing. And sex/gender is almost always assigned by doctors based on
genitalia at birth; not usually based on chromosomes. They rarely do genetic testing on babies. They just look at their private parts and call it.
Some people are born with XY chromosomes but naturally are born with a vagina and develop breasts (complete androgen insensitivity syndrome), are medically and legally assigned as girls at birth without anyone realizing otherwise, and grow up as girls, and don't even find out about their chromosomes until they fail to have periods as teenagers and get genetically tested. Then they just go on to live as women anyway. Other people have the opposite situation, with XX chromosomes and a penis, and assigned male or intersex. Some people are born with XXY chromosomes and have androgynous features. Sometimes it's difficult for doctors to determine what sex a baby is, since there's no real singular definition.
Several studies show that transgender people on average have parts of their brains that look more like the sex they identify with than the sex they were assigned as at birth, and that this is likely due to prenatal factors. It's not unreasonable to view transsexualism as a form of an intersex condition, or to expect that those brain regions might have something to do with their inner bodymaps or how their brains relate to hormones.
I had a nurse once, at my long-term family doctor's place, who had like a beard and male pattern baldness and an obviously masculine voice. He had a wife. It didn't cross my mind that he was born anything other than male. His mannerisms and overall personality didn't trigger me to notice anything out of the ordinary. Clearly, just a guy. I found out like a year later that he was a trans guy, that he changed his name from a woman's name to a man's name, had other treatments, etc. It doesn't change how I view him at all, consciously or subconsciously; he's clearly a guy.
And I mean like, here's a trans dude:
And totally hot. Anyone who would call him anything other than a guy or expect him to use the female restroom is just going out of their way to be purposely nasty.
And if someone is more androgynous, or their gender is unclear, then it's easy just to go with whatever their identity and preference are.