URP Compatibility mode is deprecated and it requires a manual action.
There are 2 options to fix this.
Preferred one if it's possible to enable RenderGraph in Graphics Settings -> URP tab -> uncheck Compatibility mode.
If it's not possible you would need to add a URP_COMPATIBILITY_MODE define to scripting defines as mentioned in the exception.