Theres 2 reasons it might go back to the potion room, one is to full make potions (you'll know because it grabs vials etc), the other is because it failed the AFK aggro reset for some reason.
Any chance you could provide logs? Would be super useful to see what the reasoning was and look into...