House Republicans passed legislation aimed at barring transgender women and girls born biological men from participating in sports.