The state's move to retroactively cancel licenses and birth certificates is part of a nationwide escalation of restrictions on the legal recognition of transgender people.