Bathroom issues

Staci • Girl Momma to River Mae & My Twinnies❤

My daughter is 4 turns 5 in June, she has been completely potty trained since 3. The past couple weeks she has been having more accidents. Not only that, she peed in her trash can in her room and I walked in on her peeing in her sink. I have no idea what's going on, i asked her why she's doing it and she said she doesn't know and sometimes she gets sad when daddy yells at her so she does this. My husband doesn't yell at her often so im not sure what to do? Anyone have any advice?