Required layers are not allowed to be removed from the project.
This adds extra safety to protect project users from removing layers
they may think are not needed (e.g. used in joins, relations, expressions).
Users can set/unset layers that are required in project properties dialog.