React native update dynamic texture error occurring

Hey,
This issue is also occurring for native navigation. I have two pages one is simple app onboarding and from that page i am using stack navigation to navigate to the page containing from the onboarding page. What I am trying to achieve is that when the user presses exit button they go back to the previous onboarding page. Navigation is working fine as it is going back to the previous page and then this error is showing. I am also using engine.dispose() before the going back action is being called.

this is my engine page:
<EngineView
isTransparent={true}
androidView=‘SurfaceView’
displayFrameRate={false}
antiAliasing={1}
adaptToDeviceRatio={true}

this is my exit button functionality:

const handleExitPress = () => {
engine.dispose()
navigation.navigate(‘OnBoarding’)
};