Well, a couple of things here. Firstly, when the gender of a character is revealed, it's in line with what I've said. There are no long-haired males or hairless females.
Secondly, long hair denoting femaleness is a cartoon trope and that's how it's used in xkcd (note my issue is not the trope itself here, but that it is used by someone who says they're passionate about equality). Using your argument, you could argue that the cartoon characters with long eyelashes and pink bows in their hair could be male, but of course in real terms that's never how they're seen.
Secondly, long hair denoting femaleness is a cartoon trope and that's how it's used in xkcd (note my issue is not the trope itself here, but that it is used by someone who says they're passionate about equality). Using your argument, you could argue that the cartoon characters with long eyelashes and pink bows in their hair could be male, but of course in real terms that's never how they're seen.