Starsong, by Annabelle Jay
The inhabitants of Earth thought they evaded the enemy robots by fleeing to another planet, Balu, under Merlin’s leadership… but they were wrong.
Meanwhile, on the nearby planet Draman, the half-human, half-dragon people celebrate a Naming Ceremony. On that day, the children pick between colored robes that represent the choice to become male or female.
After Sara Lee, maid and best friend to Princess Nimue, escapes the ceremony with a child who refuses to select a robe, she resigns herself to a life without the princess in order to fight an oppressive tradition. However, an attack by a robot spaceship looking for Merlin forces both women to seek help from the sorcerer, and princess and maid are reunited. Unable to protect them during the battle, Merlin sends them back in time, where the women must find Allanah, defeat the creator of the robot army, and decide whether the gender norms of their society are strong enough to keep them from falling in love.