### Godot version

4.0.2

### System information

Windows 10

### Issue description

I created a custom node (a class named CustomNode that extends Sprite2D) and, when I instance a scene containing it, it will appear as a Sprite2D instead of CustomNode in the node list.

### Steps to reproduce

1. Create a class extending Sprite2D.
2. Create a scene with a custom node with this class.
3. Create another scene and add the previous scene into it

The custom node's tooltipo will say the node type is the inherited class (Sprite2D) instead of CustomNode.

### Minimal reproduction project

[TestCustomNodeIssue.zip](https://github.com/godotengine/godot/files/11368445/TestCustomNodeIssue.zip)

if (EditorNode::get_singleton()->is_exiting()) {
		return; //speed up exit
	}
	if (p_node->is_connected("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed))) {
		p_node->disconnect("script_changed", callable_mp(this, &SceneTreeEditor::_node_script_changed));
	}
	if (p_node->is_class("Node3D") || p_node->is_class("CanvasItem") || p_node->is_class("CanvasLayer") || p_node->is_class("Window")) {
		if (p_node->is_connected("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed))) {
			p_node->disconnect("visibility_changed", callable_mp(this, &SceneTreeEditor::_node_visibility_changed));
		}
	}
	if (p_node == selected) {
		selected = nullptr;
		emit_signal(SNAME("node_selected"));
	}
}
void SceneTreeEditor::_node_renamed(Node *p_node) {
	if (p_node != get_scene_node() && !get_scene_node()->is_ancestor_of(p_node)) {
		return;
	}
	emit_signal(SNAME("node_renamed"));
	if (!tree_dirty) {
		MessageQueue::get_singleton()->push_call(this, "_update_tree");
		tree_dirty = true;
	}
}
void SceneTreeEditor::_update_tree(bool p_scroll_to_selected) {