Not sure if anyone is interested in serious sources (not judging you if you're not), but most poskim on the issue say halacha always follows birth gender. There is one, maybe 2 poskim, who say the surgery is halachically recognized. AFAIK it's the Tzitz Eliezer that offers this latter view, but I'd have to double check. I have a lot of sources on the matter. Feel free to PM if interested.