Sounds like you had a good scare. Any idea what breed your dog is? That'll play into the prey drive and chasing issues.
Here's our recent experience, very similar but ended badly. Hope you find it helpful; sorry about the length
We just got our first chickens about a week ago (we did have a small bantam that we lost, pretty sure to a hawk). 4 RIRs that we plan on keeping in a tractor most of the year. We'd rather have a fixed coop and let them free range. Too many predators: hawks, feral cats, free-roaming dogs, coyotes, raccoons. We are converting part of a shed/garage into a coop that'll have an attached and covered run that we'll use as needed and for winter.
For now, we're taking the chickens out a little while each day and putting them in a small tractor to let them scratch around in the grass while we're out gardening and working in the yard. Kinda like supervised play time. We'll put them into the large tractor that has an attached coop in another week or so, when they're big enough.
We have a dog that we rescued about a year-and-a-half ago. He's a lab-pit mix. Really gentle and mild-mannered around us and the kids, and most other people. Very high prey drive, though, will chase anything, and is very opportunistic. Squirrels, birds, raccoons, rabbits, cats. He hates trucks and vans, especially Fed Ex for some reason, and barks like mad whenever a vehicle drives by the house. Bad experience when he was a puppy, I guess.
We learned very early on that he needed to be kept on a leash. Don't have a dog run at the moment. We keep him in the sun room and take him out on the leash for walks and to do his business. Started him early with leash training and working on curbing that prey drive, at least as much as possible. I don't think there's much we can do personally, given his breeding. He generally responds well to finger snapping and to that "anhk!" sound. Other than that, he's driven and tunes out the rest of the world when he sees something he wants to get at.
I pretty much knew before we got chickens that
our own dog would end up being the biggest threat. We've tried introducing him on the leash a couple of times, but he locks and even starts licking his chops. And once he locks, gives chase, or has in his mouth whatever it is he's chasing, no amount of commanding, yelling etc., is gonna stop it.
Anyway, I had the chickens out in the mini tractor a couple of days ago while me and the kids worked around the garden. My wife took the dog out on the leash to go potty, he saw the chickens and locked on. She gave him the "No" command and tried to redirect, but he pulled, and pulled so hard, the collar actually broke. Ended up knocking the tractor over, chasing one of the chickens and getting it into his mouth. It took seconds, and the chicken was dead before either of us even got over there. I was only about 20 feet away from it.
So, that's a lesson learned the hard way. My suggestion would be similar to what we're doing and what others have said. Make sure the tractor and/or coop is secured. Keep a watchful eye on things, have better control over the situation, and unfortunately, treat our dog as a threat when we take him out. He's now in a harness and we're using a more heavy duty leash.
We're gonna continue trying to improve leash walking, curbing that prey drive, and going back to some more training. If that fails, then he'll be completely segregated and we'll scratch the notion of ever having him around the chickens.