It’s more complicated than that, for exactly Pakistan recognizes a third sex since years. It’s just rather shitty how they do it…
Hijra (transgender, intersex, or eunuch) are recognized, but live at the margins of society on the Indian subcontinent.
https://en.wikipedia.org/wiki/Hijra_(South_Asia)#Social_stat...