According to Quran 95:4 Allah creates us in a perfect shape. Why then are some of us physically crippled? Similarly, in Quran 51:49 Allah says that He creates everything in a pair. When then do we see transgender people?
"We certainly created man in the best of forms" Quran 95:4
"In all things We have created pairs so that you may take admonition." Quran 51:49
Individual human beings are not born identical, whether or not we have an obvious physical disability. We all have our own uniquenesses, characteristics, strengths, and weaknesses; often, some people will consider a characteristic a merit while others will consider it a flaw. (For instance, one person will consider someone who talks a lot to be friendly and social, and another might find them annoying. In some cultures it is good to be tall and in others it is strange. Etc.)
In any case, there is a lot of variety in our appearance, character, personality, etc, and usually some things are not as perfect as we would like them to be. (In fact, it is usually our imperfections that make us interesting! If all people were perfect, the world would be very boring.) (Note that for the sake of simplicity I am not speaking about the masoumeen (A) but rather the vast majority of human beings.)
What can be understood from this verse is that God created the archetype or "model" of the human being in a perfect form. That is, the model for the human being is designed in a perfect manner, both in terms of our ideal physique and our ideal attributes. However, when we are born into this world, we have a lot of individual variety. This is similar to how a world-class artist might paint a painting, and then other artists might copy it; they are all copying the same model, but each copy has its own unique ways in which it differs from the main model.
In this day and age, many people strive to perfect their physical bodies (for instance, through plastic surgery). Sometimes this is possible, and sometimes it is not. However, almost everyone can strive to perfect their ethics and character and to come closer to the ideal that Allah has set forth for us.
Similarly, the idea that things are created in pairs is a general, archetypal rule for the universe. (For instance, there is night and day, male and female, up and down, etc) It doesn't mean that there is absolutely never any individual variation or that males and females need to be completely opposite each other. It was also understood during the era of revelation that some people are not clearly identified as males or females physically.
---
ADDENDUM:
It is narrated in al-Durr al-Manthūr (one of the Sunni tafāsir) that the Prophet caught sight of a man who had let his wrapper (izār) hang low. He told him: ‘Lift up your wrapper!’ He said: ‘O Messenger of God! I have a deformity in my foot that causes my knees to knock together.’ He replied: ‘Lift up your wrapper! All that God creates is beautiful (ḥasan).’
It is also related from Imam al-Baqir from Luqman: 'Every beast loves its likeness, but the son of Adam does not love his.'
Just some thoughts!