For a normal scene I can do this and my challenge_number
is set :
@onready var scene = preload("res://scenes/test.tscn")
var challenge_modal = scene .instantiate()
challenge_modal.set("challenge_number", 3)
add_child(challenge_modal)
I will be using change_scene_to_packed
A bit lost on how to set variables here to access in the scene change and how to use the change to packed method