Get an audio signal generator, set it in the 20,000-25,000 Hertz range, feed it thru a wide-range audio amplifier into some good load-handling tweeters, and blast it their way. Not only will the (ultrasonic to humans) sound make the dog go around to the otherside of the house with tail between the legs, if the bad neighbors are outside "enjoying the yard" they will soon experience discomfort. You have to position the speakers so they have direct line of "sight" into their yard, as the wooden fence will attenuate most of the sound otherwise.
I knew a guy who used ultrasonic sound to get guests overstaying their welcome to leave. (that is, the ears and brain dont register it as a sound, but the body does react to it).