Heya,
Looking at it, order of logic seems to be the problem. You may need a separate state to test the distance of the enemy and if it is within range still, skip straight to the attack FSM.
Hard to tell in the gif but I'm guessing its taking a step forward first and then checking if its in range making that stutter step issue.