Just Adopted, will not stop peeing and pooping in crate! HELP?

I just got this dog a few days ago, she is 7 months old. Her entire butt legs and bottom side are stained yellow. I’m assuming this is from living in her own filth. She obviously has separation anxiety and I’ve looked up and tried everything I’ve read online, nothing is working. The second I leave the house she barks and whines and I’m never gone long but as soon as I come home her cage is covered in pee and poop and she’s stepping all in it. Her cage isn’t too big just the right size for her to be able to lay down and turn around and stand up. I’ve tried feeding her in her cage because I read they will not use the bathroom where the eat. She literally peed in and pooped all over her food dish. I’ve tried putting blankets and towels in there as a sleeping space but she peed and pooped all over both of them. Every time I’ve put her in the crate I’ve taken her out to the bathroom beforehand. Sometimes she will not poop when I take her out and i sit out side with her for 20 or so minutes, but the second I bring her in she poops on the floor. I honestly do not know what to do and I’m starting to get extremely frustrated. I’ve given her Benadryl twice and that seems to work but doing that worries me because I don’t want something bad to happen. I really just need some ideas of what to do because I cannot handle this for much longer.