Loki did indeed turn himself into a mare, ended up getting impregnated by Svaðilfari, and gave birth to Sleipnir, Óðinn’s 8-legged horse. Loki’s actions, however, were more about shape shifting than a change of gender. His conduct was a diversion in the context of survival, in order to keep an oath, and to avoid a horrible death. Loki was also greatly stigmatized for this sorry episode.
Loki certainly was not transgender. Changing species is referred to as hamrammr (shape shifter) in Norse myth. As a matter of facts, even Úlfhéðnar are known as well to turn into a different species, in their case, wolves. Loki simply had no choice but to turn himself into a mare, as he had to distract Svaðilfari in order to be saved from a horrible death, and to honor an oath, sacred in Norse culture (even for Loki).
The Æsir had indeed agreed for a man to build a wall in Valhöll to keep invaders out, in exchange for Freyja, the sun, and the moon. The Æsir had however imposed many conditions to ensure the builder’s failure. Specifically, that the work had to be completed in only one season, and without the help of any other man. Loki, however, managed to convince the Æsir, in his duplicity, that the man should be allowed to use his horse, Svaðilfari. The stallion, of course, managed to carry giant boulders for the wall, and to perform twice as much work as the man, to the extent that the wall was near completion 3 days before the deadline of the end of Summer. The Æsir convened to discuss the crisis, and unanimously concluded that Loki was to blame. They then sentenced him to a horrible death if he wasn’t to find a scheme to ensure the builder hadn’t completed the wall by the deadline. Loki made the oath that he would fine a solution, no matter the cost to himself. He then proceeded to turning himself into a mare to distract Svaðilfari and to lure the stallion into the woods. The two horses ran around all night, chased by the builder, who then misses as a result completion of the wall.
Even though Loki fulfilled his oath and prevented the builder from finishing the wall, he was greatly stigmatized for his actions nonetheless, as even within different species, sexuality and gender in Norse culture was particularly binary (see Viking Sexuality).
The account of events in Gylfaginning (Snorra Edda) symbolizes personal sacrifice and the absolute sanctity of oaths in Norse culture, while emphasizing the moral rot and the duplicity of Loki. It is not an endorsement, let alone a celebration, of transgenderism, which would have been absolutely abhorrent in Norse culture.