godot root scene code example
Example 1: godot get scene root
get_tree().get_root()
or
owner
Example 2: change scene godot
get_tree().change_scene(scene_to_load)
get_tree().get_root()
or
owner
get_tree().change_scene(scene_to_load)