Let's not even consider the ethics of discriminatory policy. Instead, let's focus on how this policy could even be enforced. How do you prove someone is a biological woman?
Are you going to subject women and girls to genital inspections to prove that they have the "right" gonads?
Are you going to require expensive genetic testing so individuals can prove they have the "right" chromosomes?
What about individuals whose chromosomes and genitalia don't match, such as those with intersex conditions?
Enforcing this policy will require subjecting all women to horrific humiliation in order to prove who they are.