I have this friend, together he is a good guy but when there are girls around he started to treat me like a kid and negging me to higher his ego.

Recently I just started to acknowledge that this behavior is damaging my social status. I always thought that this was no big deal but turns out that this turns off most women.