instead of moving left and right, just tap left or tap right so that your character turns but you don't move.
You'll still run into random encounters but your time in the safari zone will not decrease.