One view is that bullying can't be fully eliminated — it turns up wherever people gather, and bullies rarely need a justification. On that reading, the practical defense is keeping your distance and not letting people get close enough to hurt you.
It's worth noting the more widely supported position, though: bullying is substantially preventable through school policies, bystander intervention, and adults taking reports seriously. Withdrawing isn't the only option, and it isn't the most effective one.