Repository: godotengine/godot (language: cpp)

Issue:
Resource type properties set as favorite turns invisible when switching to other nodes
### Tested versions

- Reproducible in Godot Engine v4.4.beta3.official
- Reproducible in Godot Engine v4.4.beta1.official

### System information

Godot v4.4.beta3 - Windows 10 (build 19045) - Multi-window, 1 monitor - OpenGL ES 3/ANGLE (Compatibility) - ANGLE (Intel, Intel(R) HD Graphics 3000 (0x00000116) Direct3D11 vs_4_1 ps_4_1, D3D11-9.17.10.4459) - Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz (4 threads)

### Issue description

Whenever I use favorite properties and switch back and forth from/to other nodes the previously set favorite properties are invisible. The value of the property is still there and it is possible to make changes into that property(if i reset it and then ctrl+z), also it seems to be saving correctly, is just a display error, here's what it looks like when switching back to the changed node:
![Image](https://github.com/user-attachments/assets/3730a631-2bd4-4f71-b977-016e39b7e2a4)
Whenever i switch back to the node with the favorite properties output prints this:
     ERROR: editor/editor_properties.cpp:3286 - Parameter "parent_inspector" is null.

### Steps to reproduce

1. Favorite any resource type property
2. Create/(Drag created one) new resource on that property
3. Click on any other node other than the one you just changed
4. Go back to the node you previously changed

### Minimal reproduction project (MRP)

[favoritemrp.zip](https://github.com/user-attachments/files/18766606/favoritemrp.zip)


Discussion / hints:

Fix patch:
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 97335821374e..96acec3c6e56 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -3782,13 +3782,16 @@ void EditorInspector::update_tree() {
 				ep->set_doc_path(doc_path);
 				ep->set_internal(p.usage & PROPERTY_USAGE_INTERNAL);
 
-				ep->update_property();
-				ep->_update_flags();
-				ep->update_editor_property_status();
-				ep->update_cache();
-
-				if (current_selected && ep->property == current_selected) {
-					ep->select(current_focusable);
+				// If this property is favorited, it won't be in the tree yet. So don't do this setup right now.
+				if (ep->is_inside_tree()) {
+					ep->update_property();
+					ep->_update_flags();
+					ep->update_editor_property_status();
+					ep->update_cache();
+
+					if (current_selected && ep->property == current_selected) {
+						ep->select(current_focusable);
+					}
 				}
 			}
 		}
@@ -3841,6 +3844,16 @@ void EditorInspector::update_tree() {
 
 				for (EditorProperty *ep : KV2.value) {
 					vbox->add_child(ep);
+
+					// Now that it's inside the tree, do the setup.
+					ep->update_property();
+					ep->_update_flags();
+					ep->update_editor_property_status();
+					ep->update_cache();
+
+					if (current_selected && ep->property == current_selected) {
+						ep->select(current_focusable);
+					}
 				}
 			}
 		}


Test patch: