Dog has anxiety when left alone

Looking for advice or thoughts! Its been a little over a month since my partner just moved into a new apartment. His dog is not used to being left alone at the apartment, but has gotten a little better now. But whenever my partner and I go into his room for privacy, she starts throwing a fit. Usually scratching at the door at first. But now she's throwing her toys around and even peeing on the floor. I'm not a pet owner but I can see that she had anxiety.

Any advice on how to help his dog with this?