Why does PS5 keep saying it wasn't turned off properly?

To fix the error that says "Your PS5 wasn't turned off properly", disable Rest Mode, and plug the power cable directly to a wall outlet.
View full source