When you want to attack without closing in on your target, hold down the Shift key. The following is an example.