Countries from Costa Rica to Croatia are betting that remote work is here to stay, competing to host digital nomads even as more employers push for a return to office.