Sex isn't actually biological either, by the way.
Sex is the social construct we use to attach gender to bodies.
If it was actually about science, they would have updated biology classes with info about intersex variations as soon as they were discovered and documented - the way animal biology does with new species, and chemistry does with new elements.
There are over 40 different intersex variations named and described by medicine!! We know for an absolute fact that intersex traits exist, including chromosome sets besides just XX and XY - there's also XXY, XYY, XXX, X-null, and more. If this was actually about science, you would have been taught about them.
If it was actually about science, you would have been taught that what we think of as biological sex isn't any kind of binary - it's constellations of averages of similar traits, any of which may or may not occur alongside any other sex-associated traits in any specific person.
If it was actually about science, we wouldn't actually still be arguing about this, period, because the fact that the sex binary is false undermines the entire rationale for the gender binary's existence.
And if it was actually about science, intersex people would be subjected to a hell of a lot fewer infant genital mutilations and other human rights violations.