I used to think about this in exactly the same way as you do, so despite the wall of text I hold no judgment against you at all. But you are mistaken, and I'll try to explain why (although I'm not sure I'll do the topic of "the epistemology of science" justice in a rambling forum post).

I think you have some misunderstandings about the term "definition", misunderstandings that I certainly used to have. We use this term both in mathematics and the sciences, but only mathematics has true definitions (as in, a logical statement which precisely determines a set). I can define a right angle as the angle that makes all four angles of an intersection of two straight lines equal. We can show that it's a unique value, exactly 90 degrees, and neither 40 degrees nor 89.8 degrees are right angles. Only 90 degrees _exactly_ is a right angle.

By contrast, in other sciences we usually only have categories with fuzzy borders. Take for instance the term "species". Wikipedia says "A species is often defined as the largest group of organisms in which any two individuals of the appropriate sexes or mating types can produce fertile offspring, typically by sexual reproduction." But as a definition, in the mathematical sense, this just doesn't work, at all. One obvious shortcoming is that every infertile individual forms a species by itself, by this definition.

But the main shortcoming is that on casual inspection, it looks like it's defining sets of organisms: the set of rabbits, the set of horses, etc. But it is not, because these sets don't exist. Let A0 be a rabbit. A0's parents are themselves rabbits, and the parents of those rabbits were themselves rabbits, and so on. But rabbits haven't existed forever, and at some point we reach an ancestor An of our initial rabbit that we would no longer consider a rabbit: species(An) /= species(A0) (where for all X: species(X) is a set). But this did not happen through some break in continuity: at any point, we would consider an organism and its offspring as belonging to the same species. But then this individual An must be of the same species as A0: species(An) = species(A{n-1}) = ... = species(A0). We have a contradiction.

So strictly logically speaking, this definition is useless. Nevertheless, the concept of species is clearly a useful concept that helps us communicate things about the real world. How do we explain this?

When we'd program a video game which has rabbits in it, we'd probably neatly define some data structure or class named "Rabbit" which simulates the rabbit. But this is not how reality works: we just have a bunch of particles that are interacting which eachother. Crucially, from these particle interactions emerge certain patterns which we can observe. Our concept of "rabbit" is not imposed on the universe from the top down, on the contrary: our brains pick up on recurring patterns in the particle soup around us, and giving these recurring patterns names helps us communicate, and therefore, survive (this is what we call abstraction; I have another long rant on this forum about abstraction, if you're interested: https://news.ycombinator.com/item?id=24429749). But no two instances of such a pattern are identical, and exactly where one pattern ends and the next begins is somewhat arbitrary. Any strict definition of "rabbit" is doomed to fail.

Think of it as neural net classification: each object in the universe has some "rabbitness" value. The keyboard I'm typing this on has very low rabbitness. A fox has significantly higher rabbitness (it breathes, has four legs, two ears, etc) but still not very high rabbitness. Crucially, rabbitness is completely determined by some distance metric from earlier examples. So rabbitness is determined by _relative_ distance to earlier examples, not by anything absolute. We draw lines, somewhat arbitrarely, in this space and name them to help us communicate (such as: anything over .95 rabbitness is a rabbit). But these names are but tools and different names or different borders can be used in different contexts.

So back to sex/gender. Within the particle soup around us, we recognise the pattern "human" (or any sexually reproducing animal). We notice another pattern in these humans: they seem to fall apart into two categories based on their role in reproduction and physical appearance. We name these categories "male" and "female". But again, the borders are fuzzy and no hard definition can be found. Not all men have penises, there are women with beards, etc. Eventually, we discover DNA and find out that men tend to have XY chromosomes and women XX chromosomes. So do we have our hard definition of gender/sex now? Not at all. Not every person has either XX or XY. There are also "male-presenting" people with XX chromosomes (https://en.wikipedia.org/wiki/XX_male_syndrome).

So attempting to define sex based on chromosomes falls flat, and leads to absurdities. Suppose you become friends with a male-presenting XX, who does not know he has XX chromosomes. He has male genitalia, has identified as male his entire life, and has been addressed as he/him his entire life. Then he gets tested for infertility and finds out he has XX chromosomes, and tells you this. Will you now insist to your friend that he is a woman? Will you insist on adressing him with female pronouns? Does he have to change his gender on his passport?

I would find it absurd, not to mention cruel, to do so. We're in a situation here where it seems more productive to accept that we use overloaded terms to mean different things at different levels of abstraction. Sure, on a genetic level he's "female". But he's male in how society interfaces with him, which is much more relevant to him in most situations. So why not just say "he is male", and only discuss his genetic makeup if and when that is pertinent?