Hello!
If she's been reliably house trained, my first concern with a sudden change in pottying behavior would be something medical going on. Is she fixed? If she's starting her first season that may also cause changes in behavior due to all the hormones. Either way, it might be worth getting a vet check, because something like a urinary tract infection often starts with unusual pottying habits.
As an aside, scolding her in this scenario isn't going to be super helpful. Generally, corrections and rewards have to be done within 5 seconds of the behavior, otherwise dogs are really poor at connecting their past actions to current consequences. Unfortunately, they'll often still behave in ways that we read as 'guilty' - averted gaze, lowered head, etc - when really the dog is saying it's confused and scared and trying to look small and non-threatening so you'll stop scolding. I'd suggest sticking to interrupting if you catch her in the act and moving her outside to finish - still no scolding necessary, because you don't want her to learn it's bad to potty in front of you - and cleaning up messes you find after the fact with an enzymatic cleaner, but not making a fuss over them.
If it does turn out to be behavioral, you'll probably have to go back to basics for a bit, taking her out more frequently and rewarding her the moment she potties outside, and maybe restricting where she has access to indoors. But definitely rule out medical causes first!
If she's been reliably house trained, my first concern with a sudden change in pottying behavior would be something medical going on. Is she fixed? If she's starting her first season that may also cause changes in behavior due to all the hormones. Either way, it might be worth getting a vet check, because something like a urinary tract infection often starts with unusual pottying habits.
As an aside, scolding her in this scenario isn't going to be super helpful. Generally, corrections and rewards have to be done within 5 seconds of the behavior, otherwise dogs are really poor at connecting their past actions to current consequences. Unfortunately, they'll often still behave in ways that we read as 'guilty' - averted gaze, lowered head, etc - when really the dog is saying it's confused and scared and trying to look small and non-threatening so you'll stop scolding. I'd suggest sticking to interrupting if you catch her in the act and moving her outside to finish - still no scolding necessary, because you don't want her to learn it's bad to potty in front of you - and cleaning up messes you find after the fact with an enzymatic cleaner, but not making a fuss over them.
If it does turn out to be behavioral, you'll probably have to go back to basics for a bit, taking her out more frequently and rewarding her the moment she potties outside, and maybe restricting where she has access to indoors. But definitely rule out medical causes first!