We’ve been using the workaround here:
Where you set usePercentageCloserFiltering false onError.
With BabylonJS 4.0.3, the callback fires correctly, but the exception that triggered it is uncaught and crashes the app.
As a workaround for the workaround catching and ignoring errors from scene.render works and the shadows recover as expected.
Playground here, but it will only trigger on a buggy device, like our Chromebook: