If I change
PathFinder.dyn_request(@id, [13, 47],0,true)
to
PathFinder.dyn_request(@id, [13, 47],1,true)
Then the turning command works. I add another "wait 60 frames" after the turning command to make the result more obvious, and the guard would do like this (after giving up the chase):
walk to the target tile
turn left
wait 60 frames
walk 1 tile away from the target tile
turn left
wait 60 frames
And then the guard would repeat the above. The turning command does work.
The same setting would fail to work if I change RANGE to 0. The guard would get stuck on the "walk to the target tile" part, without running the subsequent commands. I confirmed this by adding a "Play SE" command before "turn left". With RANGE 1, the SE plays every time the guard turns. With RANGE 0, the guard move to the target tile and does not turn, and the SE never plays.
BUT, this only happens when the guard is returning from giving up chasing the player. If the guard begins on a different tile other than the target tile when the map is loaded, and then move towards the target tile, it does turn when reaching it even if RANGE is 0. So I'm not sure which script is causing the problem now.