Potty training help

I had my mom watch my dog, Coco, for a while until I could get a place that allowed pets. I had her for a little over 2 years, since she was a pup and she was potty trained well. When I got her back she was trained to piss all over rugs, idk why my mom thought a husky mix would freeze if she were to go outside in the winter but she did so when I got her back she was peeing on rugs. Eventually that progressed to her just peeing in the house and nothing I do makes her understand. I’ve had her with me for a year now and she’s still like this.

My other dog, Mickey, was a (potty trained) family dog for a couple years then my sister took him when she moved out. She had him for a couple years and didn’t really let him out as she should’ve which resulted in him pottying in the house so she gave him back to my mom cause she couldn’t handle it 🙄. I took him with me and can’t break him or Coco.

They both know it’s bad to potty in the house because they wait until I’m showering, cooking, or sleeping to do it. I let them out often and they both pee outside, Cocos better than Mickey but literally nothing I do stops it. I’ve tried the “go here” sprays the “don’t go here” sprays, sticking their noses in it, smacking (not hard don’t go off with calling me an animal abuser), and I take them out right after they go in the house to try to correct it but nothing works. Anyone have any tips? My fiancé’s had it and just wants to get rid of them. I’m not one to just get rid of dogs like that so I’ll work with them as long as I need to. It’s just really frustrating.

Edit: Mickeys 14 btw so he’s pretty old but i can tell he’s not having accidents and it’s intentional. I’ve only had him for about a month and they’re both adult dogs so I’m sure thatll make this harder for me.