Bot behaves weirdly after disabling the destination setter

Hi, I have been setting the target for the bot through the AI destination setter, but when I disable the destination setter after a while, the bot starts shuffling on the last known destination without the reachedendofpath event being called, but the pathpending event is false. I can’t figure out how to get out of this problem.

Basically, I want to enable the Destination setter for a while and then disable it and continue using Bot patrol after that…