as a kid, having long hair was enough to have a very similar experience. when i was really small, it was common for kids to run around naked, and a small girl saw me and ran to her mom screaming „mom, mom, that girl has a peepee“, being really confused. i was, in fact, not a girl, but long hair overwrote that for 99% of people. similarly, i was constantly told that i was using the wrong restroom (even when using a pissoir). if i had had a penny for each time i overheard people whisper „is she a boy or girl?“, i’d be filthy rich.
as an aside, exactly 0 people asked me for my pronouns before the age of 18.