The decision by federal prosecutors came at a time when President Trump was rolling back protections for transgender people.