DNA isn't perfect either though. It's possible to be AMAB with XX chromosomes and AFAB with XY chromosomes (both still having the "correct" fully functional organs for their assigned gender). Some intersex people can also have multiple sets of DNA, some being XX and some being XY.
Neatly fitting all cases of biology into 2 categories like that is basically impossible anyway regardless of how you do it. "Biologically male/female" is basically impossible to define without also excluding some people that were born into each category. They're fundamentally useless terms that don't actually convey anything meaningful..


As someone who has to sift through other people's LLM code every day at my job I can confirm it has definitely not gotten better in the past three months