Sure wasn't by a DNA test, just a quick look at whether it looked more like an innie or an outie.Their sex was "assigned" male at birth? How exactly was it assigned? The doctor flipped a coin and said "heads its a boy, tails its a girl?"
Sadly for the religious types pushing this agenda, biological sex is far more complex, intersex people are a thing, and there even is evidence that brain anatomy plays a role in gender.