In Japan for instance, you simply cannot fire someone without notice in these situations. You also have to prove that you've tried a whole lot of measures to avoid layoffs, such as reducing exec compensation, asking for voluntary resignations, etc. And I believe there needs to he some actual evidence layoffs are justified in the first place, same as in France I believe.
Strictly speaking, forcing a worker out in these recent tech layoff cases is going to be difficult. I'd expect both in Japan and other countries there will be much more generous severance package offers for "voluntary" quitting. The majority of workers will way that against the reality of staying in a company they know doesn't really want them anymore.