At two months they are still chicks so sex isn’t that important. You’ve probably got a few different things going on.
Chickens can recognize which chickens are in their flock. Sometimes, not always but sometimes, a chicken will attack a stranger to drive it from its territory. This doesn’t happen all the time but it does often enough for it to be a concern. Housing them side by side for a week or so usually really helps with this.
Then you have the pecking order. Every chicken in the flock needs to know its social ranking so they can get along peacefully and know who has the privileges. Determining this ranking can sometimes be violent, just like determining ranking in a herd of cattle or a pack of wolves. What normally happens when two chickens that don’t know their relative ranking occupy the same personal space, one pecks the other or somehow tries to intimidate it. If one runs away, things are working as they should. If one does not run away, they may scrimmage or fight. Usually one of them quickly determines they would be better off running away, so it is settled, though there will possibly be repeat reminders and some chasing involved.
It’s very important that they have enough room to run away or just avoid the stronger chicken to begin with. If they don’t run away, it’s a challenge to the social ranking. That’s why new chickens or younger chickens often seem to form their own separate flock. They are avoiding the stronger chickens to start with.
A more mature chicken will outrank an immature chicken until sufficient maturity is reached that the chick can force its way into the pecking order. Size isn’t really important, maturity is. With pullets, that is often when they start to lay. Often, not always. They are living animals. Always doesn’t always apply.
If a chicken gets trapped against a fence or in a corner and does not run away, it’s considered a challenge and the stronger keeps pecking or attacking. Often a chicken, especially a younger chick, will just squat down and take it instead of trying real hard to get away. This can start a frenzy where the other mature chickens start pecking the one cowering. This can draw blood or even result in death. This sounds like what is happening with yours.
So what can you do? First, house them side by side where they can see each other but cannot get to each other for a week or so. Maybe section off a portion of your coop with wire.
When you do let them mix, give them as much room as you can. This is critical. They need room to run away and avoid. You can increase the effective “space” by providing places for the younger chicks to hide behind or under. When they are locked in the coop, my younger ones often hide under my nests, which are pretty low to the ground. Something else I often see is my younger ones up on the roosts out of reach of those on the floor of the coop. They are avoiding.
Provide feed and water in different areas so they can eat and drink without challenging the older chickens. Keeping the immature chickens away from the food and water is a common intimidation tactic to reinforce the social ranking.
At two months, yours may not be roosting yet. On the roosts as they are settling down for the night is where mine are most vicious to younger birds. Often a hen pretty low in the adult pecking order will go out of her way to be brutal to immature chickens on the roosts. I’ve had chicks used to sleeping on the roosts abandon the roosts and find a safer place to spend the night. Sometimes that can be your nests. I provided a separate roost, a little lower than the main roosts and separate horizontally to give them a safer place to go.
I normally integrate my brooder raised chicks at 8 weeks, but mine have lived side by side since Day 1 as my brooder is in my coop, I have a lot of room, and they have a separate place to sleep. Often at 12 weeks I move them into my coop to spend the night, but I have a large coop with lots of roosting space and hiding places. I also make it a point to be down there early in the morning to let them out so they can run away and avoid instead of being trapped with the adults. If you don’t have lots of space, you may need to wait until the chicks are much older, maybe close to adult size, before you try to integrate them.
Good luck! Many of us do this type of thing regularly with minimal problems, but I can’t emphasize enough how important space is. That makes all the difference.