Before there was Harry Potter, there was Oz. There was a lot of Oz. There were 14 Oz books by L. Frank Baum published between 1900 and 1920, and there were dozens more written by other authors after his death.
Baum received thousands of fan letters. People lined up to buy the books. There was merchandising. There was probably fanfic too, but, you know, not online.
Oz was big.
Oz wasn't the "just a dream" world of the movie. It was a real magical world that was visited by real children-- a girl named Betsy, and a girl named Trot, and a girl named Dorothy, and... maybe some other girls. I don't remember.
My grandfather read all the Baum Oz books as a child, while women battled for the right to vote and men battled for German trenches. There was nothing remotely similar being published at the time. Children's fiction was dominated by the Depressingly Moral (let's just say Little Eva has a lot to answer for) and the shoot 'em up action adventure. No one could die in Oz. This was a flaw as far as narrative tension, but a real innovation otherwise.
Given a choice between reading about brave little heroines wasting away from consumption and reading about the caverns of the Nome King, kids chose the latter. Early twen-cen kids loved the Oz books.
Many decades later, my brother and I read them. First we read all the L. Frank Baum ones, and then all the Ruth Plumley Thompson ones and the John R. Neill ones. Even as late as the 1970s, they were a large part of the extant body of children's fantasy literature.
Although the main character, Dorothy, was a girl, and the other main child characters (Betsy and Trot and Princess Ozma) were girls, and the only boy we saw much of in the Baum books (Button Bright) was kind of a low-watt bulb, nobody ever suggested to us that these were girls' books.
One of the Baum books does have a boy protagonist, Tip, who ***spoiler alert*** near the end of the book becomes a girl. Permanently. If this traumatized my grandfather or my brother for life, they never mentioned it.
(Chances a middle grade author could get away with that nowadays: Zero.)
(Possibly slightly less than that.)
I've talked to my brother about this a bit over the years, as he's raised children and I've raised books. According to him, he never, as a child, experienced any failure to connect to a female protagonist because of her un-maleness. According to him, the only books he felt were off-limits to him were those that were clearly identified as being "for girls"...
...and that is what we're doing far too much of today.
I'm picturing how the Oz books might be published today... in a world where they weren't already classics, that is. Pink and lavender covers. Glitter, perhaps. Lots of emphasis on the Princess aspect.
After all, no one would expect boys to read a book about girls.