Yes, but notice periods are typically provided for in people's contracts. As a result, pay in lieu of notice is generally taxable as salary. As others have pointed out, compensation for loss of your job is something entirely different.
The salient point is the fact that, had nothing happened, you would have received the pay in lieu of notice anyway in the form of salary. Take someone with a three month notice period. If they stay on, they get three months salary like any of us. If they leave immediately, they get their three months salary upfront. Either way, it's fundamentally the same thing...salary. Intuitively, it should be taxable.