Happens to me too, I'm guessing it takes too long a time for them to do the assigned order that's why they go back. Try adding more regions in the map that redirect their orders, works mostly for me. You can also put them in a group and order them to move every 1 second or so, to stop them from getting stuck if a certain spell cancels their ordered action (such as knockback and movement spells). Ever seen that non-moving creep in Dota after you've used boots of travel on it? Well, the orders got cancelled so he's just idle there.
If not, check your triggers and maybe you are ordering them to go the wrong way round.