I run the code as per the sandbox and get the console error Uncaught TypeError: Cannot read properties of undefined (reading ‘ARRAY_BUFFER’)
at Engine.ThinEngine.bindArrayBuffer (thinEngine.ts:1553:42)
at Engine.ThinEngine._resetVertexBufferBinding (thinEngine.ts:1447:14)
at Engine.ThinEngine.wipeCaches (thinEngine.ts:2740:14)
at Engine.ThinEngine.restoreDefaultFramebuffer (thinEngine.ts:1440:14)
at Scene._bindFrameBuffer (scene.ts:3688:30)
at Scene.render (scene.ts:4065:18)
From my guessings there is probably something incorrect with your import.
You may try to check it as import * as BABYLON from '@babylonjs/core'
and then use as const engine = new BABYLON.Engine etc
If it works, it means that your previous import was not full.
If it doesn’t work, there could be other errors.
As I already mentioned, without detailed information from you it is hard to guess where the error is.