As Britain’s vote launches the country’s exit from the European Union into a new and difficult phase, the bloc is cementing a top goal: Halting more EU defections.

The bruising 3½-year Brexit process has been so negatively viewed by European voters that even EU-skeptic parties on the Continent have mostly dropped talk of leaving the bloc or the euro. Instead, nationalist politicians such as Italy’s Matteo Salvini and France’s Marine Le Pen now speak of changing the EU from within while reassuring voters that their countries...