If I'm reading this right, it was a Male Litwick, you made it shiny, and it became Female, is that right?
Proceeding with that assumption, my response is: just roll it another shiny PID?
Between Gen 3 to Gen 5, Gender is determined by PID. So if you changed the PID, the gender might change. Based on what you've described, it sounds like it is working as intended.