The agent is not following the outlined path for moving to its destination because destination is in different network. How i know i have multiple networks and how to avoided that. So agents move on the path.
to see if you have multiple networks, you can check on the projects panel
Here you will see all the networks you have, and what nodes are contained inside each network.
AnyLogic doesn't know automatically how to connect these 2 networks if you want to do it, so you need to have attention to details when you build your networks.
if your agent move between nodes that are not in the same network, you will get unexpected results