That's exactly what "Flock Guardians" do.I saw a Great Pyrenees tangle with a coyote on a friend's goat farm.
This dog looks like 150 lbs. of snow, coyote slinks into pasture, the dog was all over the coyote like white on rice. I mean turning the coyote every which way but loose. Coyote managed to roll out from under the dog, and talk about a'hole and elbows, he was getting gone, too fast for the big dog , went over the fence like a deer.
Dog stopped, turned around, and came back and laid down with the goats. It's like the dog knew who was the sheriff in town, and no need to get all upset about it.
Friend said he hadn't lost a goat in 4 years since he got the dog.