As I understand it, typically prior to this change a passport (as an identity document rather than record of birth) allowed you to write the sex of your choice (I think there was a statutory declaration involved).
At what point can an asylum seeker get a passport? I'm going to guess it's not when they arrive, not when they become a refugee, but probably 5 years later when they can apply for citizenship?
If that's right, I guess my next question is; If someone is being persecuted for being trans, and they come to NZ... why can't we just issue the identity document with the details they need in order to fit in here? If we must you can record original birth cert/ID document details in a backend system, but I can't see a reason not to issue the document however they want to be known in NZ (and that applies to people who simply want a different name, even if not trans). If you're worried about fraud, do your fraud checks when issuing the document.