It would seem that, in mice at least, it's not a structural difference that make males and females behave differently. It's merely a "wrapper" on the base class:
The enormous difference between male and female sexual behaviour may be explained, in animals at least, by a tiny organ in the nose rather than by any gender difference in brain circuitry.
"In the big picture, it suggests that the female brain has a perfectly functional male behaviour circuit" which is repressed by signals from the vomeronasal organ, Professor Dulac says.
Seen from the perspective of developmental biology, "the finding is very satisfactory", she says.
"It means you only have to build one brain in a species and that the one brain is built, more or less, the same in the male and female."