The Obama administration took the position that barring the students from bathrooms that matched their gender identity was a violation of Title IX, the federal law that prohibits sex discrimination in public schools.