(basing this off of The Sapphire Story, even though it's not technically my "first written protagonist" it's my first serious attempt at writing something)
My first protagonist who was introduced did end up being male, like myself, but only a few pages into that same chapter I had my other protagonist introduced who was female. They're based off of Brendan and May from the games, and I introduced the Brendan character first because he was the one of the two who was moving to Hoenn and I liked how that started off the fic exactly where it started in the games I was basing the fic off of. Even now as I try to rewrite that story, I'm starting it with him (not in the same scene, though) because I like the image and tone it sets with him having to move to a new region because of his parents' decision.
At the time of writing and posting new chapters of that fic, I did tend to write more male characters. I for sure felt more comfortable writing them, but most were based on characters in the games, so it was hard to avoid it (looking back I could have gender-bent characters, though I never thought of it) and I ended up with caricatures of NPCs like the guy in Petalburg Forest looking for a Shroomish or the guy in Littleroot who didn't let you leave the town until you visited your neighbor. As I wrote the fic, though, I feel like I focused more on my May character than anyone else. I was conscious even of how I listed my characters in descriptions, and I made it a point to always describe my main characters as "Kira and Cole," so that her name was always first.
When it comes to more current writing, my biggest writing aspiration has an even distribution of male-female protagonists, and that was a conscious thought to do that. I also have firmly chosen to start with a female narrator because I feel that it is very important in a work of novels such as this one. Even looking at my NaNo piece from a few months ago, I have two main characters, one male and one female. Granted, the male character has a lot more page time, but the female character is instrumental in moving the story forward, so... that's something I would like to rewrite in edits, because I like having a male-female duo as main characters and giving them equal weight within the story.
I actually feel like it is easier for me currently to think of female characters. I think it's a name thing, because I know I am way more picky when it comes to male names, and if I get stuck on naming someone, I tend to work on other areas of writing until I can think of or find a name that I like. I don't think confidence has anything to do with writing female characters for me... I have three younger sisters, and my mom was more of a parent than my dad, so I should have a good understanding of females to some people, but I don't think I can portray them as well as I can portray a male character since I've spent my whole life as a male and understand the world best through a male lens. The biggest thing that has changed is trying to be aware of that in writing and not writing from that male lens, because it is a pretty boring lens when it comes down to it.
Gender-bending a character is something I would like to try. I've just never really though of it. I know what characters I need in a situation, or what characters I would like to write, and in most cases I think switching their gender would not do much. But I'd like to try, because I'm sure I'll prove myself wrong and find a bunch of changes it causes and I would like to challenge myself in writing a character that isn't perfectly easy just because I've given them the gender that I want them to have. An agender character is one that I've really wanted to try writing, too, and I've had this idea to try writing in a character but giving them no descriptions that "give away" a gender at all, and only referring to them as "they/them/etc." Not sure how it would go over, but it's something that I would be more curious to see how people picture them, and if it is more based on the gender of the reader, something I said or had the character did, or something else.