I ran into 3 dogs in 45 plus years of riding that gave me a thrill, most will stop chasing when they get to the end of their property, and others will stop if you tell them in a sharp command voice to "go home". Most dogs you can outrun on a bike.
The first dog that chased me I was climbing a grade, came up to a house with the guy working in his yard, suddenly this medium-sized dog came out after me and was trying to bite my leg as I was pedaling, back in those days we had full-size frame pumps, so I grabbed and smashed that dogs nose with it, it went screaming back to the owner and the owner screamed at me for hitting my dog, so I yelled back if that dog ever attacks me again I'll kill it!
The second dog was very unusual, he ended up chasing me through a city for about 12 or 13 blocks, I was on a street with traffic lights, so I had to stop to wait for traffic to clear, as I was stopped the dog is gaining on me, some cars saw the situation and stopped to let me run the light others had no clue. At about the 12th or 13th block, I heard a screech of tires, and turned around to see that dog smack a brick wall, it was hit by a city bus, and the dog died.
The 3rd time this farm dog came charging at me, I was on my touring bike and loaded, so I wasn't going to be able to outrun the dog, I now carry pepper spray clipped to the outside of my handlebar bag, so I grabbed it and gave a shot at the dog's face, he went screaming away.
I've had a few other chases but those dogs were more into it for fun, not to chew on me, you can sort of tell, but even a dog thinking it's having fun could accidentally hurt you if they accidentally run into you.
Where I live and ride I'm more concerned about deer than I am about dogs.