Transgender students once found an ally in the Department of Education, which under the Obama administration robustly investigated alleged violations of their civil rights and argued that federal laws against sex discrimination ensured their access to public school bathrooms and changing facilities.

But that has changed in the months since President Trump took office. Since February, the department and its Office of Civil Rights have reversed their position on bathroom access and rescinded the findings of at least one civil rights investigation. Advocacy groups say the two have also made confusing statements about discrimination against gay and transgender students.

This quick erosion of support has reinforced the importance of the court system for transgender students, many advocates said. But, paradoxically, it has also made it harder for such students to pursue civil rights claims.

“Students and their families have a right to go to court to have their rights vindicated, but they shouldn’t have to,” said Harper Jean Tobin, the policy director of the National Center for Transgender Equality. “The Office of Civil Rights is tasked with handling these complaints precisely to avoid costly and time-consuming litigation, but if it refuses to do it’s job, the courts will be the backstop.”

An antidiscrimination lawsuit filed last month by a transgender student in Florida, Drew Adams, was a case in point, advocates said. Mr. Adams sued the school board of St. Johns County on June 26, saying that he was being required him to use gender-neutral restrooms at Allen D. Nease High School in Ponte Vedra because he is transgender.

“It’s very isolating and alienating to know the school sees you as different and sees you as less than your peers,” he said. “The school says basically I’m not worthy of the same education my peers get.”

Erica Kasper, Mr. Adams’s mother, said they had filed the lawsuit after efforts to work with the district — and a Department of Education investigation opened in response to a complaint she filed — went nowhere.

She said a department investigator had told her that the inquiry was put on hold after a judge issued an injunction last fall that stopped the Obama-era guidance on bathroom access from going fully into effect.

Ms. Kasper reached out to the investigator again when the Trump administration changed that guidance, but the email she sent bounced back and no one replied to her voice mail message. “The Department of Education vanished on us,” she said.

Mr. Adams’s lawsuit argues that requiring him to use a different bathroom than other boys is a violation of the Equal Protection Clause of the Fourteenth Amendment and Title IX of the Education Amendments of 1972, which forbids sex discrimination in education.

Tim Forson, the superintendent of the St. Johns County School Board, said in a statement that the board did not agree with “the plaintiff’s interpretation of the law.” But this time last year, Mr. Adams’s argument would have echoed one made by the Department of Education.

Under the Obama administration, the department issued guidance to schools in 2016 that said Title IX should be interpreted to ensure that transgender students were treated the same way as nontransgender students of the same gender identity. That meant transgender boys should be allowed to use the same restrooms as every other boy in school.

But that changed in February when the department, under the Trump administration, announced that it no longer believed Title IX required “access to sex-segregated facilities” like restrooms and locker rooms “based on gender identity.”

The new guidance has had a big impact. It was cited by the Supreme Court in March when the court said it would not hear the case of Gavin Grimm, a transgender student whose bathroom access lawsuit the court had agreed to hear when the Obama-era guidance was in place.

It has also led the department’s Office of Civil Rights down a murky path, advocates for transgender students said. When asked at a Senate hearing on June 6 whether the department would allow schools that receive federal funds to discriminate against gay and transgender students, Education Secretary Betsy DeVos demurred.

“For schools that receive federal funds, federal law must be followed, period,” she said. “On areas where the law is unsettled, this department is not going to be issuing decrees. That is a matter for Congress and the courts to settle.”

But in early June, the Office of Civil Rights issued a memo that Liz Hill, a spokeswoman, said was meant “to clarify” for its investigators that “transgender students may still be the victims of sex discrimination under Title IX.” (She declined a request to provide the memo to The New York Times.)

Ms. Tobin said that although the department has said it will continue to enforce the law, “every time they are asked what they mean by that, their answers have been singularly unhelpful.” She said Ms. DeVos’s testimony and the recently issued memo had “muddied the waters.”

This uncertainty has unfolded amid a broader shift in department policy, announced last month, to scale back civil rights investigations of all kinds. The department said the move would make the civil rights investigations it did conduct more efficient, but critics said the change would only make them more rare.

The department has closed at least two cases involving transgender students: one in Palatine, Ill., and one in Sparta, Ohio. It also rescinded its findings from a 2016 investigation that the Ohio school district had violated Title IX by denying a student access to the girls’ restroom and by not adequately responding to harassment and bullying that she faced.

“They’ve withdrawn their guidance, and now they’re withdrawing their enforcement of previously existing agreements that they have,” said Ed Yohnka, a spokesman for the American Civil Liberties Union of Illinois, which filed a complaint to the Education Department in 2013 on behalf of the student in Palatine.

Ms. Hill would not say whether the department had closed any other investigations into possible civil rights violations of transgender students since the new guidelines were issued this year. She also declined to say whether the department had withdrawn its previous findings in any other cases involving transgender students.

She said that the department had closed the Illinois case because the student in question had graduated, and that it had closed the Ohio case because the student had “entered litigation against the school.”

But Ms. Hill declined to explain why the department withdrew its findings that the school had violated Title IX, saying only that its “decision to withdraw its earlier letter and to close the case did not reflect a view of the merits of the complaint or the litigation.”

In February, the department said its decision “does not leave students without protections from discrimination, bullying, or harassment.”

But Christopher Stoll, a lawyer representing the Ohio student, said the withdrawal of the findings in her case suggested that this commitment was hollow.

He said the decision “simply ignores that the department previously found that Title IX was violated not only because of the bathroom access issue, but also because of the school district’s inadequate response to harassment.”