I’m sorry for your loss.
What do you mean by male behaviour? Dominance behaviours during bonding are totally normal for either sex of piggy. It’s not necessarily bullying or aggression at all.
If she didn’t like the other piggy and they aren’t compatible then they won’t be able to form a bond. A different piggy will need to be tried.
Spaying her for bonding sounds very drastic step to take and is not necessarily going to make any difference at all!
Spaying is a major surgery and not one to be done unless there is a medical need ie if a sow has ovarian cysts.
If the bonding failed because they were not compatible then spaying her isn’t going to make any difference whatsoever.
How old is she? Sometimes no matter how hard you try older sows don’t like new company and prefer their own space. In that case the solution is often to have another piggy living alongside in a separate cage so they can interact between the bars but not have to share territory.
I’m not saying that is going to need to be the solution in your case as we don’t have information about piggy piggy.
Bonding and Interaction: Illustrated social behaviours and bonding dynamics
Sows: Behaviour and female health problems (including ovarian cysts)
Dominance Behaviours In Guinea Pigs