I have heard that cows or goats with horns will fight off predators but ones without will run. Now that said, when I brought my little Nigerean home my large and small dog thought it was great fun to run up at her, barking like crazy. She sent then literally flying with a head butt. They decided to let her be in peace. She did have horns and I was there to intervene if things got rough. Now my dog was a mutt but did have birddog in her(She pointed at everything, snakes, chickens, etc.). I think a viscous dog or even worse a couple of dogs working in a pack mentality would have been able to take her down easy enough.
Does in a barn a night would have been easy pickings with no way to get away and German Shepherds are very large dogs. A buck might have had a better chance to fight off a predator. I would be trying to find out whose dog that was. If it would attack livestock, who's to say it would go after your children or yourself. Most dogs don't kill for food but just for the sport of it. I don't now but have in the past shot at a couple of strays that killed most my free range chickens in just a few minutes time. I don't know if I hit them but they never returned. Goats are a huge investment for a small homestead!
I have always tried to secure my critters at night because of the predators in the area, bears, coyotes, cougars, raccoons, etc. Hardware wire on the windows. Some animals like a bear probably could go through this if they wanted but I think a 6 ft. high window with hardware wire or 2x4 fence (or both) wire would keep most things out.