That is not transgender. It is an example of an hermaphrodite species (Greek - Hermes, a male god, and Aphrodite, a female god).
Gender switching, male to female, or vice versa also occurs in nature.
Hermaphrodite organisms - leeches, prawns, oysters, starfish, frogs, coral, hydra, tapeworms and deep sea fish.
Gender switching organisms - fish (clown fish, wrasse fish, hawkfish, parrot fish, anemonefish) slugs, marine snails, bearded dragons (Aust. lizards), oysters, and quite a few other species.
Logically speaking, given that our human DNA shares many genes with lower life forms, it is not impossible that some of our genes relating to sex/gender might differ in a few individuals.