There are scholars in every field who specialize thematically. They might spend a career exploring the different aspects of the history of medieval towns, or the Transcendentalists, or what have you. By the time their third book and a handful of articles come out, they are acknowledged experts in that field. My own dissertation advisor was (and continues to be) just such a scholar.**
Then there are scholars who move from one topic to the next as their interest dictates. Another one of my graduate mentors was like this: her first and second books, both well-regarded, were on radically different topics, with only a geographic area and broad chronological sweep tying them together. Her most recent book sees her leaving even those two commonalities behind so she can examine a broader phenomenon (tangentially related to her first book, but only a bit) in transhistorical perspective.
Again, I say that both of these approaches have their merits. No matter what, I think we should all make our choices dependent on what our interests are as we launch into a new project.

But there's a problem with being a fox, one that goes beyond having to learn a whole new field, and that problem is Other People. Other People become invested in What You Do, and breaking out of that is difficult. I've heard reports from foxes that, for years and years after their first book comes out, they are invited to speaking engagements, or to contribute to volumes on "their" topic, and have a very difficult time explaining that they just don't do that anymore. ("Professor Jones wrote that great book on Cistercian nuns, but her talk today is on crusader medicine? What's up with that?")
My experience with this phenomenon came during my most recent stay in Exotic Research Country. Over the years, I've made a number of friends there, many of them other junior academics. Yet when my new topic came up, they were puzzled: "But what does that have to do with gender?" Well, nothing specifically. It's a different project. "But it will eventually be on gender. Or [other thematic focus of book 1]." Well, no. "Oh, I'm sure it will."
I learned to stop trying to convince other people. Perhaps they'll believe me if and when the next project begins to emerge. Hell, perhaps, by the end of things, the project will circle back around to gender -- who knows? But isn't it odd how invested other people get in our scholarly identities, and how eager they -- and we -- are to fix them in place somehow?
Even if it's only to try to define ourselves as a fox or a hedgehog, I suppose.
Stay tuned for part 3: a defense of the hedgehog, and gender studies!
**Well, sort of. He never published from his dissertation, which was a meticulous study the account books of a particular institution that had nothing whatsoever to do with the thematic area that he devoted the rest of his career to. He once referred ruefully to the time he spent "counting barrels of pickled eels," and claimed that he never even considered revising it for publication "because I hated that thing."