After making some modifications, I've tested the functionality on my mobile device through several openings and closings, and it appears to be working properly. However, there is still one issue that needs to be addressed - when opening the screen, it briefly pops up and then disappears.
Here are the specific lines of code that may need to be adjusted to resolve this problem:
it's the reset of global variables... something loads before that triggers some values... then the event sheet start of layout"reset the global variables" happens. so between this loading and start of layout u get ur glitch.
try to place the "reset global variables" in loading screen before entering this eventsheet. like in the menu or on the "preloading screen" since u reseting global variables which are available through all scenes it should think the "ghost pop" when u load the gameplay. or atleast logically should work... but that isnt 100% when coding lol ... goodluck hope this helps. And Happy Easter if u you celebrating.