I believe the trick is to not spam the button but press it regularly, if that makes sense. I think if it's spammed they will run past the enemy sometimes and do weird loopty loops