No need to set it to 0 every time you move. Once you start moving, you won't stop unless you get interrupted or something (causing the while loop to fail anyway).
Considering how many times this portion of the code is run O(n^2), this should be taught in the tutorial to at least have code efficiency running through their minds while coding
Also, if if kicks you out of the loop, a normal player would click again anyway. I've never once in my RS play time not try to click again after 2 seconds of lag