Where would a hypothetical employer stand if they recruited a man over a trans woman, and when pushed for a reason why, said it's because trans women are women, this woman is of childbearing age and we couldn't afford it if someone went off on maternity leave.
They would clearly be being discriminatory if the person was a natal woman. But as the individual has zero chances of getting pregnant, even hypothetically, have they been discriminated against?