We have an electric fence around our chicken run, we have witnessed dogs come up to the run and get zapped by the fence and run off. It may not be a 100% perfect solution but it is an additional layer of security.
Sorry for the loss of your ducks 😢, I hope some additional security measures will...