That's one of the tactical points where Pathfinder 2 really differs from 4e. In 4e, moving is a separate thing from attacking: you have one standard action which is usually used for attacking in one way or another, and one move action that's usually used for, well, moving. So unless you're faster than your opponent, there's no use in moving away from them, because they can move and attack just as well as they could make an attack without moving*. In addition, opportunity attacks are a thing pretty much everyone can do if you move away without Stepping first or using some form of shenanigans.
But in PF2, movement is an action like any other. If you move so the enemy can't attack you, it will need to spend an action to follow. And PF2 is FULL of monsters that have some pretty strong things they can do if you let them spend three actions on them, such as a Strike + Grab + Constrict routine.
* This is of course grossly simplified, and you can certainly have tactical reasons for moving around in 4e. The main one I can think of is moving to reduce the monster's ability to catch multiple people in an AOE, or to set up combat advantage for an ally.