### Godot version

4.2 6da4ad1

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

![image](https://github.com/godotengine/godot/assets/2223172/d65ab202-93dd-4d83-bcef-c2b34bfa23f3)

In 4.2 dev3:
![image](https://github.com/godotengine/godot/assets/2223172/8621ec24-65d4-490d-bfc1-7e6e8aa3606a)


### Steps to reproduce

1. Create a scene with some children
2. Instantiate it in another scene
3. Enable editable children

### Minimal reproduction project

N/A
if (!p_node) {
		return;
	}
	
	
	bool part_of_subscene = false;
	if (!display_foreign && p_node->get_owner() != get_scene_node() && p_node != get_scene_node()) {
		if ((show_enabled_subscene || can_open_instance) && p_node->get_owner() && (get_scene_node()->is_editable_instance(p_node->get_owner()))) {
			part_of_subscene = true;
			
		} else {
			return;
		}
	} else {
		part_of_subscene = p_node != get_scene_node() && get_scene_node()->get_scene_inherited_state().is_valid() && get_scene_node()->get_scene_inherited_state()->find_node_by_path(get_scene_node()->get_path_to(p_node)) >= 0;
	}
	TreeItem *item = tree->create_item(p_parent);
	item->set_text(0, p_node->get_name());
	if (can_rename && !part_of_subscene) {
		item->set_editable(0, true);
	}
	item->set_selectable(0, true);
	if (can_rename) {
		bool collapsed = p_node->is_displayed_folded();
		if (collapsed) {
			item->set_collapsed(true);
		}