Your dog saw sheep, went through the gap in the wall, and did not hear a word you said. You got them back, and you have not slept since.
Take the fright seriously and leave the shame out of it. What matters now is that your dog does not get to do it again while you work on it.
Why this one is different
Chasing pays while it is happening, with no help from you. Every rehearsal makes the behaviour stronger, and one successful chase can teach more than weeks of practice.
Dogs also respond less to their caregiver's cues around the onset of adolescence, and that responsiveness returns later in the stage. Your recall is competing at its weakest point.
Farmers will tell you a chase alone can be enough to harm a sheep, and that contact can kill one. The consequences for your dog can be final.
Today, before any training happens
Fit a well-fitting harness and a 30 foot long line, and use it anywhere livestock or deer are possible. Held in your hand near stock, not trailing.
Change your routes for now. Fields with stock in them are walked on a short leash, or not walked at all this month.
Find one enclosed, fenced space for off-leash running, and use that instead of open country.
Scan for sheep, deer and hares before your dog does. Turning away at 200 feet is most of the job.
That is management rather than training, and it is not giving up. Behaviour change is built from management plus reinforcement, and the line is what keeps the reinforcement possible.
Train disengagement, not recall out of a chase
A cue aimed at a dog already running is spent for nothing. The behaviour worth building happens earlier, at a distance where your dog can still think.
Work at the distance where your dog can notice stock and still take food from your hand. That is usually much further back than you expect.
Wait for your dog to look at the sheep, then say one word and feed as they turn back to you.
Walk away from the field together and finish. 6 reps and a retreat beats 20 minutes standing at the fence.
Move 20 feet closer only once your dog turns back on 8 tries out of 10 at the current distance.
Practise the same turn-away on the long line with birds, joggers and squirrels, so it is not a skill your dog only meets beside sheep.
You will be told to settle this with a shock collar. Reward-based methods are what the veterinary behaviour guidance recommends, and aversive methods carry welfare and behavioural risk.
Safety note
Keep your dog on a leash or a long line around livestock until this is resolved. Treat that as permanent unless a qualified behaviour professional tells you otherwise. Get help now if your dog has caught or injured an animal. Chasing that appeared suddenly in a dog who never chased warrants a veterinary examination, because sudden behaviour change does.
Today's version, in one line: long line on, routes changed, and 6 turn-aways at a distance your dog can manage.