This kind of situation was rare but possible. In some female novels, the queen of a dynasty might be a man. This could be because the author wanted to explore the theme of gender dualism or because some of the queens in history were considered male. However, there were also many female novels that respected history and did not treat some female characters in history as men. If you want to know more about this kind of novel, you should read related novels or search for related information.