5e Starter Set spoilers below
I'm DMing the 5e starter set and my party made it to Thundertree. They met the Dragon Cultists there and went to go speak with the Dragon, which turned out to be a huge mistake on their part. Distracted by killing the cultists, the dragon didn't notice when the party's first 3 attacks completely bounced off of him and they started to run away. Now, the trick/trouble is that we're playing with a grid (which I know is not very 5e of us, but we like the visual aspect to the encounters) and at some point all of the characters got to the edge of the grid. They get there just as the dragon basically notices they're leaving.
How do I handle a retreat and/or pursuit in this case? I guess I could keep "shifting" the grid over so they never get to the end of the world so to speak, but how far would this dragon follow them? He is faster than them too, so likely he'd catch up fairly quick and turn them into mush. I'm a little bit of a soft DM for killing the characters (it's still our first campaign), so I just rolled an ol' d2 to see if he'd follow, and he got lazy. I'd like to know how to actually handle this in the future though.