An encounter will end if you run far away. Not sure if you need to gain distance from enemies or the encounter location though.
There is not tip for this however. And it takes ages - I tested and it took 3 turns of straight running away with a rogue - run, dash, dash.
I would personally prefer a retreat button as in DOS games.