When writing a female character, sometimes you really can't win. If she's quiet and unsure, she's too weak. If she's a fighting badass, she's either a Strong Female Character (TM) or a Mary Sue. If she has stereotypically feminine traits, she's suggesting that girls can't have masculine traits, and if she has stereotypically masculine traits, she's suggesting that feminine traits are bad. Even a well-conceived and well-written female character can become trapped in "damned if you do, damned if you don't" criticism, where any choice is scrutinized for what it Says About Women.
It's enough, I'm sure, to put many writers off trying. Why include a female character when you'll just be criticized anyway and nothing you do will ever be good enough? Better to avoid the whole issue.
But people who flinch from this kind of criticism miss the most important part. "When writing a female character." A character. Just one.
No one ever looks at a male character and wonders what that character is saying about men in general. But female protagonists are so rare in certain genres that every single one immediately seems to take on the duty of representing All Women and making a statement about what All Women should be.
Imagine Game of Thrones if the series only had one of its female protagonists. What does it "say about female characters" if the only one is young, naive Sansa, or tomboyish Arya, or psychotically ambitious Cersei, or concerned mother Catelyn? In isolation, each one could be seen to make a statement about female characters in fantasy literature, about what role they should play, and any angle can feel inadequate. They're allowed into the story if they're victims, or if they throw off traditional gender roles, or if they're the hero's mother, or if they're the villain. But because we get to see all of these different characters at once, with different personalities and roles in the story and even interacting with one another, they escape the burden of representing Female Characters in Fantasy Literature and get to simply be characters on their own terms.
Of course, it's unfair for female characters to be seen as representing All Women, but we've been trained to see things that way. Our culture loves to treat women as a monolith, asking "what do women want?" or "what do women think?", and two women thinking different things is often portrayed as a contradiction within the female hive mind. "One woman said she likes this thing, and now a different women is saying she DOESN'T like it? Women should make up their minds!" And even when we want to view female characters with more depth, we're subconsciously aware of this hive mind concept. Combine that with the general lack of female characters in stories and our awareness of the negative ways that women are often portrayed, and it's natural for us to view sole female characters as Representative of Women. And whether we view the character's take on Women as insightful or worthy of criticism, that's a huge problem. At best, it can prevent a viewer from appreciating a really well-conceived character. At worst, it perpetuates negative stereotypes and reinforces the idea that women have to be a certain way to be worthwhile.
And it could be fixed so easily. All writers have to do is include more female characters. Heck, they could literally take some male characters, change their names, and be done with it. If the characters already had gender neutral names, they wouldn't even have to do that much. The moment a story has two different female characters, those characters stop representing Women and start being characters of their own. The burden placed on them by a long history of poor representation is immediately lessened. Poor representation can still be criticized, but characters won't come under fire for being one type of person and not another.
Basically, everybody wins. No token girls, no female hive mind, no undue scrutiny placed on female characters, no writers who feel like they simply can't win. What could be the problem with that?