Children begin a game in the yard and your dog runs after them. They may be excited rather than angry, but a child can still be frightened, knocked over, or bitten. Stop the chase by calmly separating the dog and children without grabbing at the dog's mouth or collar in a struggle. Do not ask the children to run again to "teach" the dog.
Before play starts, use a secure gate, closed door, or a well-fitting harness and lead held by an adult to keep the dog away. Children and dogs should not be left together unsupervised, and supervision means an adult close enough to step in. If your dog has nipped, bitten, or cannot be safely stopped, seek qualified behavior help and veterinary advice. Injuries need prompt care.
Give chasing a safe outlet
In a secure area without children, practice a recall and a cheerful turn toward you, rewarding generously. Play appropriate chase or tug games with a toy where everyone can stop easily. Do not use a toy if it creates guarding or more frantic behavior. Teach the dog to settle away from children's play and reward relaxed watching only at a distance where they are not straining to join.
Children should not be responsible for training the dog or keeping themselves safe by staying perfectly still. The adult controls access. A dog who rests in another room while children run is not missing a lesson, they are part of a safer household. For more on setting up child-and-dog spaces, see the dog-and-child safety guide, keep children out of chasing situations and get individual help
Sources: Dogs Trust: How to stop your dog chasing cars, bikes and animals. Dogs Trust: Dogs and children - living happily together.