well, anyway i spent half an hour making it possible, i tested this method with every pokemon exept GBA and Switch games and it works fairly consistently.
So here's the method:
Open your .Sav file in PokeHex.
After you open it go to "SAV" tab, click below on "Block Data" and another window should have opened, In the window go to "Block" and search for the Block "MyStatus", after that open the misc and change the "Gender" to either 0 or 1, where 0 = Male and 1 = Female.
After that close the window and go to "Trainer Info" and check if it changed your gender, this is a fairly important part, because this method dosen't always work and it have a high chance to corrupt the save data for some reason.
then simply Save the file and play.