cameraPosition not updating when panning Mapbox map - or how to use OrbitControls in Mapbox?

Hello threejs community!

I am not sure if this is the right place to ask this - I also added a question on Stackoverflow here, so if that is a better place, please remove this post here.

I am using ThreeJs to add a THREE.BoxGeometry with a THREE.ShaderMaterial that uses cameraPosition attribute inside its fragmentShader on a MapboxGL map using custom layers.

The rotation and panning works inside ThreeJS with OrbitControls. However, since OrbitControls is not supported with Mapbox(?), panning and rotating the Mapbox Map camera does not seem to affect cameraPosition of my shader (it does not change it’s rendered image, even though I am using cameraPosition as a variable).

Starting from this example here, is there a way to calculate the cameraPosition using the projectionMatrix?
Or could I calculate the cameraPosition from the projectionMatrix from inside the shader?

Or is there an example of OrbitControls being used inside Mapbox?