Children have what is called gender permanence. If their mother cuts the hair short etc., they still see her as a girl. Surely this is one is the things Jesus was referring to when he told us that we must become a children to enter the kingdom of God. This is an eternal trait.
Some have same sex attractions or opposite gender feeling but this does not change the male or female which they are and always have been. This aspect of identity was there before birth and will be after birth. Most people have some form of feelings contrary to gods law and eternal truth, but those will cease in the resurrection. For example, a male attracted to other males will wake in the resurrection without those feelings. He will still love his brothers, for love is of God, but he will not experience any romantic longing toward them.
You see, this life is less of a reality than eternal life. This life is short in comparison to that one to come (and yes we will have our physical bodies there). We go through many strange things in this life, and the test is to see if we will have faith in God, if we have love for him and his truly altruistic laws.
Some people’s disabilities are physical, others emotional, others social, others mental, others sexual (‘Gender Dysphoria’ only recently became eliminated from the official list of mental illnesses), etc., and God heals them all in the resurrection. This is why we praise Jesus Christ, he is the one who made the resurrection possible, wherein not only will our bodies rise in their perfection, but so will our minds, etc. etc. in every way, disability is healed, and wholeness is restored. Mankind had no disabilities before the fall of Adam, and Christ overcomes the fall. As the scripture says, “as in Adam all die, so I’m Christ are all made alive.”
Yes, Christ overcame death itself, and all the other negative experiences of this life. He gives resurrection to everyone as a free gift, and if we follow his commandments, we can qualify for greater happiness than is possible for a mortal to comprehend.