Well, I personally preferred to refer to Meloetta as Female, but from what she says in PMD: GtI, there is a chance that she basically has two personalities or is even transgender in both forms, but are essentially the same Pokémon and same gender. The only reason I could come up with was that in the BW anime, Meloetta in her Aria form is pretty shy, but gets used to someone she meets for the first time pretty quickly (like with Dawn and even developed a possible crush on Ash), while her Pirouette form is basically her "Battling form". This is evident with the fact that her Pirouette form is only usable in battle after using Relic Song, even though hacking the form in (via PKSM on a save file of Pokémon X or Y and Sun/Ultra Sun or Moon/Ultra Moon or PKHeX on Black, White, Black 2, White 2 and Scarlet & Violet) works just fine and even reverts back to Pirouette form after changing to Aria form in battle. Still, it is confusing that she calls her Pirouette form as "My prince!" and vice versa as "My princess!", even though she is the same gender, Female, despite not even having a specified gender to begin with even in a spin-off like Mystery Dungeon.