It actually can flee under special conditions. If Gotcha’s, GoPlus and other catching devices are used and they fail to catch it in one ball, it will instantly run. If the game detects high speed or an accidental GPS drift you’ll also have exactly one try to catch it or else it’ll run as well (hence why I waited about 10 minutes before attempting to catch it since I was in fact in the highway when it spawned). If the game crashes it will not run but it will also be a loss.
Assuming normal conditions and the game working as it should, they can indeed not flee, but they will break out quite a lot.