I have a singleton named Globals set up in my game. Below is a screenshot of the project settings:

The main scene for my game is Game.tscn and I have the following code in that scene:
func _ready():
if get_viewport().size.x > tile_size.x * Globals.GridSize.x:
zoom_factor = (tile_size.x * Globals.GridSize.x) / get_viewport().size.x
min_zoom = zoom_factor
if get_viewport().size.y > (tile_size.y * Globals.GridSize.y) / zoom_factor:
zoom_factor = (tile_size.y * Globals.GridSize.y) / get_viewport().size.y
min_zoom = zoom_factor
The game is working fine when I run it on my PC. Yesterday it was working fine on Android via both USB and package install, however today I'm getting the following error when running on Android:
Invalid get index 'GridSize' (on base: 'Nil') (Line 19)
Line 19 is:
zoom_factor = (tile_size.x * Globals.GridSize.x) / get_viewport().size.x
From the debugger I can see that Globals is [null], whereas when I run the game on my computer it shows me the object ID of Globals. It looks like the singleton is no longer recognised on Android.
Does anyone have any idea what might have caused this and how I can fix it?
I have tried removing and readding the singleton with no success. I don't really know what else to try...today I haven't modified anything in project settings or Game.tscn, so I can't work out why this is impacted.