they have probably known you a long time, and are trying to treat you the same as before, in their mind they most likely associate you with male and male appearance, and it will take a while for them to change that, as its not something you really consciously think of. i think it would be bad to just cut your friends out of your life completely over this, and to just keep reminding them when the slip up in the meantime, and if it is consistently over a long period, then maybe think about really talking to them about how you feel.
i think with the four year old, it was kinda hard for them to know what to do, with you in front of them as well. its something that they have probebly never had before, and they are trying to support you when they told the kid off, even if it wasn't the best thing to do, it shows they do care and support you, and are just trying their best to make sure you are accepted, or rather stick up for you.
hope it all works out and you can remain friends, but remember, friends don't purposefully make you feel down, and if they do, then you are better off without, but friends can inadvertently make you feel down sometimes.
hope it all works out π