Since you mentioned she's recently been spayed, it's worth noting that that can make her regress in her potty training for a bit. Whatever method you have been using, you'd want to really reinforce it for a while since she's recovering from that.
I also fully agree with confining them and then taking them to potty and praising like crazy when they do. Idk anything about the "bad dog" thing, but rather than calling them a bad dog, maybe just say a firm NO when they potty in the wrong place. The biggest thing with potty training is to build up their confidence, make them feel good about what they're doing, so they'll continue to do it right.
Best of luck and be sure to share a pic when you can