The Senate has rejected legislation aiming to bar transgender women and girls from participating in school athletic competitions designated for female athletes.