When you teleport while performing a job task, the bot gets stuck and does not continue

Have a nice day. While doing a job mission, when the potion runs out or the weapon breaks, he leaves the mission and teleports to the city, and after teleporting, he does not continue the mission route I have drawn, that is, the urban route. It tries to use the walking command I chose in the mission I used to return to the city from the contraction area, and since the distance is far, it waits steadily in the city. It goes back and forth as the mission is completed until the potion runs out, there is no problem, but when the potion runs out and you teleport, it stays stationary in the city, I would be very happy if you could help me.