The cases could have broader impacts on transgender rights nationwide.