That depends entirely on how you write it. If you write it as two characters with a difference in power fighting and the weaker one losing because they were overwhelmed, or tricked, or were unaware that their opponent was stronger than them, then that will look like a character biting off more than they could chew. How you write their reaction to the loss is what will determine whether you come off as sexist or not.
If I read a comic in which a female character takes on a male character and loses, and it's because the male character was more powerful, my first reaction isn't "HOW SEXIST!", it's "oh, what is the female character going to do now? How will they win next time?". I only think "HOW SEXIST!" if the story explicitly tells me she lost because she is a girl.
Otherwise, it's just a fight.
"Oh, she lost because she hasn't had as much experience in fighting as her opponent" is not sexist. "Oh, she lost because as a woman, she is naturally less agressive and therefore weak" is sexist. It's your responsibility as a writer to make it clear to us readers what is happening, and present this to us in a way that makes sense.
Is it, though? Some guys might want immediate payback. Other guys might give up and declare themselves defeated. Some might get traumatised by the fight and be to scared to fight again. Declaring that all men are hardwired to want to fight is, you know, also sexist.
Some guys are aggressive fighters, some guys are soft sweethearts. Everybody is different. Everybody reacts differently to defeat.
Again, this depends entirely on how you write it. Is your girl the kind of person who wants revenge by fighting, or is she more likely to try to use diplomacy? Is she going to recruit allies? Will she build some kind of trap to give herself advantage next time?
Making the villain female won't really change that.
I don't know. If I got in a fight and lost because I'm physically weak (I am; I'm out of shape and have never punched anybody in my life), I would probably find it completely reasonable that I lost, because I'm not a fighter. If your girl is a fighter, and fighting and winning are important to her, and she lost because she's physically weaker than her male opponent? She's going to feel just as upset and just as bitter and just as revenge-minded as a male character in that exact same situation.
There is no universal, single way girls think. Just as there is no universal, single ways that men think.
A character's psyche and way to relate to the world has a lot less to do with their gender identity, and a lot more to do with their previous experiences with the world. Are they a happy, positive, well-adjusted individual? Then they will react differently to any situation than if they were, say, a depressed, self-doubting individual who has been through a lot of loss and negativity. A self-confident person will react differently to being confronted with a challenge than a person who is very unsure of themselves.
A happy, positive, self-confident person for whom winning or losing doesn't matter much will, after defeat, probably dust themselves off and go "Oh well, that's how it goes sometimes!" regardless of their gender. A person for whom winning or losing means everything will get back up after a defeat and swear vengeance, regardless of their gender.
While our gender identity certainly impacts how we live our lives, it's not the single determining factor. I am not the way I am because just I am a woman; I am the way I am because of the life I have lived, and the way it has shaped my personality. I am soft and emotionally fragile, but I know plenty of women who could take a beating by the world and keep on punching, because they are made of steel and determination.
- You're assuming all men are exactly the same. They're not. The "alpha male" stereotype is not universally true. Some guys don't care. Some guys do. Some guys like fighting. Some don't. You can't say a male character would obviously react a certain way because they're male. That's not how human beings work.
- Your female character is a human being with her own experiences and personality that will shape her thought process. Is she someone who feels humiliated by defeat and needs to make up for it? Then yes, pushing herself to get stronger to defeat the villain makes perfect sense. If she is someone who doesn't really care much about being defeated? Then she probably won't give a damn about losing, and probably won't bother training!
- Seriously. Just write your character the way you would write a male character in the exact same situation, then make her a girl. This is all you need to do. It's that simple. Really. I promise. Unless your story is going to be about being a girl, then the gender of the character doesn't matter. Unless your story is going to discuss sexism or gender identity or femininity vs masculinity, then gender is secondary to a character's function in the plot.