According to this, spiders have XXO, XXXO, and XXXXXY, and probably more besides. Sounds like it would be hard to come up with a chromosomal definition of sex that would cover all spiders, to say nothing of spiders and apes.
And, to bring it back to humans, there are walking, talking, living examples of XY females and XX males in the world today. Sometimes, genes get swapped around funny or don’t work quite right and you get a mismatch between the form of the body and the chromosomes.
So far as I know, most XY females identify as women and most XX males identify as men, they aren’t transgender folks
And people with sexual trisomy. “Either it’s a boy or it’s a girl” is pretty much the traditional example of a XOR choice, but as we learn more and more about biology it turns out to be nowhere near a XOR.