So wait are livestock guardian dogs to their flocks like… Clark Kent among the residents of Smallville? He’s been here since he was a baby, we all know him, and he’s… generally one-of-us shaped, uh, approximately. And then when something goes wrong he suddenly leaps into action and does some terrifying impossible shit none of us could do. And then comes back home and settles in like nothing happened and he’s one of us again.
Hmm.
HMMMMMMMMMMMMMM.
Actual answer: the sheep know the dogs are not sheep, and they also know the dog is protecting them and take their cues from the dog about whether they need to run for the barn or can just ignore anything scary that approaches.
However, a friend once had an extremely premature orphan lamb born in December who had to live in the house for a couple of months with leg braces and all that, who due to spending her lambhood with dogs instead of sheep came out of the whole experience convinced she was a livestock guardian dog! She would patrol the perimeter of the fields every evening with the actual dog, stand watch in the barn door at night like the dog, and was more than willing to throw down if she saw something scary coming towards the flock the way the guard dog did. Tragically orphaned lamb did a convincing job at being a guard dog without actually having any of the biological advantages a dog has over a sheep.
Which I suppose made her Sheep Batman.