I am going to do some wild speculating here. I'm going to guess that she was not properly housebroken to begin with, and that due to punishment she is afraid to relieve herself with you watching (dogs quickly learn that if they pee in front of people they get punished, but if they do it out of sight they are "safe" - since they don't associate delayed punishment with the action
if you have a designated area for her to go you can try the following tip
Potty Training Tip
It allow the dog a bit more comfortable spacing while still allowing you to reward proper behavior in a timely manner.