Japan is isolated by being an island nation. You can only keep people out if you have the people to man the borders. It’s not a long term solution.
But as long as you man the borders it’s a solution.
Germany has given up all pretence of borders. That never works out for the inhabitants...
....Or build a massive wall as the Donald proposes. Notice how popular he has gotten.