I use plastic carpet runway strips with the spikes facing upwards to keep the cat from banging into the bedroom door all night. It works perfectly for it, maybe it will work for your dog.... The cat won't go near the spikes.
I got it at home depot, its like $2 or $3 per linear foot, in the carpet section. It comes in 3' wide rolls. They sell two kinds, one is about $1 cheaper per foot, but the spikes are not nearly as stiff, pointy, or numerous as the more expensive one.
I roll it up during the day, and put it out at night before going to sleep.
Highly recommended.
View attachment 293038
Do you have one for their vocal chords? My cats would just sit in front of the mat and yowl all night.