There are a few books that have stories about potty. They encourage toddlers to go potty , if she doesn't want to go alone, go with her, but seriously, it's sad she is 4 ! Why is she scared?
I would definitely try to figure out what the fear is stemming from. Show her that its okay to be afraid but its even better to be courageous. See what happens if you try to face those fears together. Sometimes a cracked door or even standing outside of the door can be helpful. Almost like training wheels on a bicycle. There is a real issue here with her being four. So, your first focus should be identifying and next elimination. I believe in the two of you. Celebrate every small victory. Let her know that your watching and you see her efforts. Make it a "big thing" when she goes. If you are comfortable with her PC physician, I would even bring it to their attention. I hope things change for the better. 😉
Does she have a favorite stuffed animal? Maybe if she goes to 🚽 potty with Teddy 🐻 it’ll be less scary… just throwing something out there