Yes the sound of a dog whistle can sometimes shut up a barking dog but then again sometimes it may just make them bark more.
However if you blow a dog whistle at the barking dog every time they start barking they should eventually get the hint and shut up when they shouldn't be barking.
I've actually used a dog whistle sound I found on Youtube to shut my neighbors barking dogs up and I point a speaker towards the window and when the dog hears that dog whistle sound they immediately shut up and stop barking.
You can also buy an ultrasonic sound device that shuts neighbors dogs up from barking or you can also search youtube for an ultrasonic sound to shut the dogs up as well.