I'm not sure if this is the cause or could be contributing, but what are your project settings? If you have the expand mode set to 2d
or viewport
in the window settings of the project, it could be that the game view in pixels is different than the screen size it is being played on, which could perhaps potentially lead to the difference.
You could maybe get around it by using the root viewport size, but I'm not totally sure:
var screen_size_y : float = get_tree().root.size.y
func _ready():
set_zoom(Vector2(1080/screen_size_y, 1080/screen_size_y))