Surface is black when using terrain (2D)

I am playing around with cesium’s 2D mode and TerrainProviders.
My goal is to determine the altitude at mouse location.

I’ve tried to use both Maptiler’s terrain provider with the following code:

        const terrainProvider = useMemo(() => new Cesium.CesiumTerrainProvider({
            url: '',
        }), [])

When I am zoomed out, everything looks fine and I am able to get the height data:

But upon zooming in i get

and the following error:
“Failed to obtain terrain tile X: 6 Y: 2 Level: 2. …or: Offset is outside the bounds of the DataView”

I am not sure what is going on.
I would like it to be so that even if the data is “bad”, I would still see the 2d image.

Thank you

Update: It seems that this bug happens only when in 2D mode.
After switching to 3D mode and back to 2D mode, everything looks fine.

A workaround I’m currently using is to switch from 2D to 3D and back to 2D with duration=0, but this is obviously not ideal for production code…