If the aim of each country is just job creation, leaving aside "comparative advantage", job quality, salary, etc:
1. There are plenty of things being outsourced, They can be done locally.
2. There are plenty of things currently not being done by locals - like elderly care.
3. We can find new things to do.
4. We can work less.
And even if those things raise living standard somewhat, the efficiencies from AI/robots should be more than enough to compensate.
But, in a capitalistic globalized economy this isn't how things work. So we'll see some shift from that. And it will work better in countries with a more democratic socialistic leaning rather than capitalistic.
We're already starting to see that, with the recent EU trade deal with china, limiting the amount of cars china can send to Europe.