Foreign fighters legal risk is rising globally. Thousands fighting in Ukraine face prison at home. Here’s the hidden legal paradox.