Another comment would be that certain breeds are more prey driven than others. Breeds that have a high prey drive (most but not all terriers ect) are much harder to train- and in general should not be trusted alone with small prey type creatures, as they were bred to catch and kill small things. Breeds that are retriever types (labs, goldens, ect) are in general more trainable to not hurt chickens- they more or less want to catch and play/retrieve small things, and can differentiate between a chicken and a stick/squeaky toy/ball ect. Livestock protection dogs (anatolians, pyrenees ect) are more likely to protect the flock than chase the flock, but some still need to be taught- as they were more bred to protect hoofstock than featherstock. Herding dogs IMHO can go either way- they are very smart and are highly trainable, but can have a high chase drive. People and place protecting dogs (GSD, rott, dobies) can also go either way- some have high prey drives and some don't. Each dog must be evaluated on some points. High/medium/low prey drive? Smart/medium/low intelligence- how trainable is the dog? I have taken care of some dogs which had such high prey drive, they seemed completely impervious to my attempts to train (a min pin, a fox terrier, and a jack russell). One current dog (dobie) is a people pleaser, smart and has a low prey drive. He is completely trustable with adult chickens/cats/other dog, but stares at chicks like they are dog cookies. He is not left alone with chicks. The other dog has a medium prey drive, is not very smart, and tends to the submissive side. He is trustable with adult chickens due to training.
So for current dogs- evaluate them on a case by case basis- and desensitize, train, and protect the chickens when they are alone. For future dogs, stack things in your and your chickens favor by picking breeds or mixes that are less likely to have a high prey drive, and have the brain power to learn rules and boundaries.