As someone who has punched multiple bullies into the face, I can tell you it does stop it quite efficiently.
Two of them basically instantly switched to never again daring to acknowledge that I even exist, for the remaining >5 years of being on the same school. The remainder wasn't smart enough to stop instantly and thus got multiple beatings. There's always the one kid who needs to touch the hot stove multiple times until they realize it hurts ;)
Would I recommend it to children now that some decades have passed and I am an adult? I don't know.
But it does work, ideally if applied without prior threatening and in quick succession. People really don't like having multiple fists in their face when they didn't expect it to happen.