You cannot stop following with a macro. You need to press a movement key to stop follow.