Invisible control not processing positions

Godot Version 4.2

func process_item(item : Item):   
	var new_item = item_scene.instantiate()
	add_child(new_item) 
	new_item.set_item(item)   
	# player_inv_ui.grab_focus()
	for slot in player_inv_ui.slots:  
		if check_slot(slot, player_inv_ui, new_item): 
			set_grids(slot, player_inv_ui, new_item)
			place_item(slot, player_inv_ui, new_item) # create new function later thats just place instead of release_grab
			# new_item.global_position = slot.global_position
			# print(slot.global_position)
			break;

Question

godot dosnt want to set the positions of the grid slots no matter what i try…

basically, it prints the wrong position if the control isnt visible on game start, but if i start game and open inventory the close it or just open it; then pickup an item it prints the correct position, so if i want it to work i have to open it atleast once🗿

func _ready():     
	player_inv_ui.set_slots(player_inventory, self)
	
	visible = !visible 
	await get_tree().process_frame  
	visible = !visible 

This works but I dont understand why the Inv needs to be visible for 1 process frame for the grid to set the child nodes positions.
Ive tried everything to force the grid to update.
This is a stupid work around