Here's an even funner fact: Gender reassignment sugery can not and will not change your DNA assignment.
Classification of Methods Used for Sex Determination
Visual method or clinical method
Microscopic methods
Advanced methods.
Sex differences in tooth size
Sex determination using Barr bodies
Sex can also be determined by the study of X and Y chromosomes in the cells which are not undergoing active division.
Sex determination using polymerase chain reaction
PCR is a method of amplifying small quantities of relatively short target sequences of DNA using sequence-specific oligonucleotide primers and thermostable Taq DNA polymerase.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6344795/
https://eforensics.info/learning_module/sex-determination/