The ruling came in response to a lawsuit filed on behalf of families with transgender or nonbinary children who allege their healthcare has already been compromised.