### 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)

warning_icon = SNAME("NodeWarnings4Plus");
			}
			
			const String bullet_point = String::utf8("•  ");
			int next_newline = 0;
			while (next_newline != -1) {
				next_newline = conf_warning.find("\n", next_newline + 2);
				if (conf_warning.substr(next_newline + 1, bullet_point.length()) != bullet_point) {
					conf_warning = conf_warning.insert(next_newline + 1, "    ");
				}
			}
			String newline = (num_warnings == 1 ? "\n" : "\n\n");
			item->add_button(0, get_theme_icon(warning_icon, SNAME("EditorIcons")), BUTTON_WARNING, false, TTR("Node configuration warning:") + newline + conf_warning);
		}
		if (p_node->is_unique_name_in_owner()) {
			item->add_button(0, get_theme_icon(SNAME("SceneUniqueName"), SNAME("EditorIcons")), BUTTON_UNIQUE, false, vformat(TTR("This node can be accessed from within anywhere in the scene by preceding it with the '%s' prefix in a node path.\nClick to disable this."), UNIQUE_NODE_PREFIX));
		}
		int num_connections = p_node->get_persistent_signal_connection_count();
		int num_groups = p_node->get_persistent_group_count();
		String msg_temp;
		if (num_connections >= 1) {
			Array arr;
			arr.push_back(num_connections);
			msg_temp += TTRN("Node has one connection.", "Node has {num} connections.", num_connections).format(arr, "{num}");
			if (num_groups >= 1) {
				msg_temp += "\n";
			}
		}
		if (num_groups >= 1) {
			msg_temp += TTRN("Node is in this group:", "Node is in the following groups:", num_groups) + "\n";