TESTIFYING BEFORE the Senate Judiciary Committee on Wednesday, Attorney General Jeff Sessions was asked about his decision to deploy a Justice Department lawyer to help prosecute the killer of an Iowa teenager who identified as both male and female. The choice is a welcome sign that the federal government has not entirely left transgender Americans behind. But, as Sen. Al Franken (D-Minn.) pointed out to Mr. Sessions, the aggressive prosecution of a possible hate crime "doesn't tell the whole story" about a Justice Department that has also rescinded protections against workplace and classroom discrimination toward transgender people.

Family and friends of 16-year-old Kedarie Johnson describe his gender as fluid: He referred to himself as "he" and "him" but liked to wear feminine clothing and sometimes went by the name Kandicee with friends. In March 2016, he was shot dead in an alley in his home town of Burlington, Iowa. State prosecutors are pursuing charges of first-degree murder against the main suspect in the teenager's death, and the federal government is investigating the shooting as a possible hate crime.

According to Des Moines County Attorney Amy K. Beavers, Justice Department attorney Christopher Perras is joining the case to allow a smoother transition between state and federal prosecutions should the federal government decide to bring hate-crime charges. It's rare for the Justice Department to assign its lawyers to work on state cases. That Mr. Sessions appears to have personally requested federal intervention shows a willingness to be forceful in prosecuting crimes against transgender people.

This willingness contrasts with the attorney general's decision to roll back protections for transgender people under federal anti-discrimination law. While the Obama administration argued that discrimination on the basis of sexuality or gender identity would be prohibited by laws against sex-based discrimination, Mr. Sessions has advocated a narrower legal interpretation. In February, he supported the revocation of guidance defending the rights of transgender students.

To be sure, criminal prosecution is a different matter from an anti-discrimination case. Mr. Sessions has promised to "enforce hate-crime laws aggressively" as part of his tough-on-crime stance. And he seems to be making good on that promise — even though, as a senator, he voted against the expansion of hate-crime legislation to include attacks on the basis of gender identity or sexual orientation.

We are glad to see the Justice Department work to bring to justice the killer of a young person who was just beginning to figure out an identity and place in the world. But defending transgender people, often the most vulnerable among us, means much more than bringing charges against those who attack them. It also requires shielding them from harassment at work and school and protecting them from situations — such as being forced to use bathrooms that don't align with their gender identity — that can lead to violence. If, as Mr. Sessions told Mr. Franken, the Justice Department has "no hostility" toward transgender people, he must also understand that prosecuting hate crimes against them is less than half the battle.