I don’t know what the official Catholic Church teaching on this matter is, but coming from a “merely Christian” prospective (as that I find myself in a time of discernment and spiritual journey, not being 100% what Christian faith tradition I believe, Protestant or Catholic):
I would anticipate in faith that at the Resurrection of the body there will be unity between the spirit and glorified flesh - that is the say, people will identify with the gender which God created in their person, there will be no discrepancy between what the mind thinks, the spirit senses, and what the body shows, unless in His ultimate and transcendent wisdom this pairing of a male spirit with a female body or a female spirit with a male body is God’s intention for that being. Another thread quoted Peter Kreeft saying:
The first reason would be a reaction against what is wrongly seen as monosexual soul-stereotyping. A wholly male soul, whatever maleness means, or a wholly female soul, sounds unreal and oversimplified. But that is not what sexual souls implies. Rather, in every soul there is—to use Jungian terms—anima and animus, femaleness and maleness; just as in the body, one predominates but the other is also present. If the dominant sex of soul is not the same as that of the body, we have a sexual misfit, a candidate for a sex change operation of body or of soul, earthly or Heavenly. Perhaps Heaven supplies such changes just as it supplies all other needed forms of healing. In any case, the resurrection body perfectly expresses its soul, and since souls are innately sexual, that body will perfectly express its soul’s true sexual identity.
peterkreeft.com/topics/sex-in-heaven.htm
I tend to agree with Kreeft here.
Does this mean God made a mistake? No. It means we live in a world corrupted by sin, a world about which St. Paul wrote to Church of Rome saying: “I consider that the sufferings of this present time are not worth comparing with the glory about to be revealed to us. For the creation waits with eager longing for the revealing of the children of God; for the creation was subjected to futility, not of its own will but by the will of the one who subjected it, in hope that the creation itself will be set free from its bondage to decay and will obtain the freedom of the glory of the children of God. We know that the whole creation has been groaning in labor pains until now; and not only the creation, but we ourselves, who have the first fruits of the Spirit, groan inwardly while we wait for adoption, the redemption of our bodies. (Romans 8:18-23 RSV-CE)” Is disease part of the creation which God called good or very good? What about death? No. Therefore is it possible that sometimes a person might be born with a body that does not reflect his or her true dominant gender? I think so. Now…what that person
does about it, that is a perhaps a different matter. I believe the RCC teaches that Catholics shouldn’t undergo sex change operations, but I don’t think this establishes that the phenomenon of transgenderism is nothing, nor should it nullify the hope of the transgendered Christian that God will transform their body to match their soul, or free them from the belief that their soul and body do not match when their body is risen from the grave.
You ARE being facetious, right?
Nope, that’s a real thing. People born with both male and female parts are called
intersex, and while it only applies to a very small percentage of the population it does occasionally occur. I don’t know what God will do with such people at the resurrection, but once again I really like the idea that Peter Kreeft suggests in the quote above.