What comes around goes around.
It sounds like your dog is acting out because of the surgery, like she's angry that you had her spayed. Show her you love her despite having put her through a surgery that will allow her to live longer and the behavior problem should pass.