There is a Node3D as a target for walking there, but it outside of the NavRegion so the NPCs stop at the Region’s edge
This is where it would be in the code:
if leave:
nav_agent.target_position = target[8].global_position
# target is the Node3D's position, you can just leave it as "target" for the explanation :)
Well, when the navigation agent is done and reached the edge, you can just make it walk off “manually”, by setting it’s velocity in that direction.
Or you probably have some code to make the NPC stop (by setting it’s velocity to zero) when the nav agent reached it’s target. You could disable that part of the code when leave is true, so it won’t stop at the edge and walks off.