Do companies actually force people to continue working during that period? I would expect that in tech they'd allow them to leave early because employees who have chosen to leave the company are some times not the most helpful to keep around for months
Yet people keep believing mandated work after a layoff is a thing.
In some countries the notice period can go for months. Usually it gets longer with the tenure. It allows both parties to transition and prepare in advance.