Part of this depends on what time period of a name having been mostly female you think counts.Marion
is the most obvious example in the USA. This became a male name in the early 18th century in honor of Gen. Francis Marion
of the Revolutionary War. This was able to happen because Marion
was almost completely out of style as a female first name during the 1700s.
There are two recent examples of names which had switched to predominantly female but switched back again to mostly male within a decade or so because of famous actors bearing them.
The first one is Dana
, which had switched to mostly female in the USA in the early 1940s but then went back to being mostly male between 1947 and 1954 because of the actor Dana
Andrews. This was a short-lived reversal, though, because it then went back to the girls again.
The more recent example is Ashton
. This became predominantly female in the USA in 1986 after the television miniseries "North and South" featured a female character called Ashton
Main. It stayed more common for girls until 1998. That was the year Ashton
Kutcher first started to get famous. His great celebrity combined with the general fashion for boys' names ending in -n caused the name to boom for boys and it seems to be mostly re-established as a predominantly male name. Dana
were both able to reverse their gender changes because the original male-to-female switch had happened recently enough that most parents of newborns who were inspired by Dana
Andrews or Ashton
Kutcher didn't yet realize that the names had become mostly female. It would be hard for a celebrity to create this effect in a name which had been well-established as mostly female for over 25 years.