A federal judge has allowed an Idaho law requiring public-school students to use the bathroom corresponding to their assigned sex at birth to take effect, while also allowing a challenge to the law by the family of a transgender student to continue.