Male and female is a dichotomy.
And a dichotomy is a distinction. And we see by making distinctions.
So the purpose of the dichotomy is simply to see.
And of course it is a mistake to take a dichotomy or a distinction, literally.
So we are not talking about literal males and females - except at first to enable us to see the metaphor to come -.
And so naturally your insight is correct. It is both literal male and females that practise group bullying.
To understand this better, it is a good idea to compare it to mathematics. For mathematics starts off literally with counting and numbers 1,2,3.... but very soon these literal numbers are abstracted into mathematical metaphors.
And it is the same here. We start of with the literal distinction between male and female. Then we abstract this distinction or dichotomy into a metaphor. And in this case the metaphor is group bullying.