I've had a couple neighbors with 'ultra sonic' deer repellers in the past. Fortunately they weren't close enough to hear from home but I always hated them when I went for a walk. One stopped working after a while, I figured the battery died and they didn't realize.
Our neighbour hates cats, and we happen to have one - as do most of the other neighbours. So he installed an ultra sonic device, PIR activated.
Luckily, my hearing degraded, but my 16yo is quite annoyed by it.
However, the cats do not care. Like at all. They learn fast that there is no danger involved, so they ignore it.
So I highly doubt this will work for dogs either.