Is it possible to disable editing for certain layers in a QGIS project?
It is possible to make a layer not editable in a specific project.
Open Project properties > Data sources and check the option Read Only for the layers that you want to make not editable.
You can also use one line python script. Select a layer and run the script:
According to the documentation, if the layer is in editing, it returns