### Godot version

4.1.1

### System information

Linux Mint, Godot 4.1.1

### Issue description

Hi,

I've extended my own class, which extends "Node2D".
Now, in the create node menu, the icon from the "Node" class is displayed instead of the icon from the extended "Node2d"-class.

Here is a screenshot to show how it looks:
![Bildschirmfoto vom 2023-07-28 10-18-12](https://github.com/godotengine/godot/assets/34768615/378773cb-e47c-4cde-adeb-2444802058d7)

But after you create the node, the correct Icon is picked:

![Bildschirmfoto vom 2023-07-28 10-20-07](https://github.com/godotengine/godot/assets/34768615/3e8dc583-55fa-401e-a574-2d97297333a6)

Regards
abgenullt

### Steps to reproduce

Extend from a custom class and check the icon in the menu.

### Minimal reproduction project

[InheritTest.zip](https://github.com/godotengine/godot/files/12192148/InheritTest.zip)

saving_resource = Ref<Resource>();
			ObjectID current_id = editor_history.get_current();
			Object *current_obj = current_id.is_valid() ? ObjectDB::get_instance(current_id) : nullptr;
			ERR_FAIL_COND(!current_obj);
			current_obj->notify_property_list_changed();
		} break;
		case SETTINGS_LAYOUT_SAVE: {
			if (p_file.is_empty()) {
				return;
			}
			Ref<ConfigFile> config;
			config.instantiate();
			Error err = config->load(EditorSettings::get_singleton()->get_editor_layouts_config());
			if (err == ERR_FILE_CANT_OPEN || err == ERR_FILE_NOT_FOUND) {
				config.instantiate();
			} else if (err != OK) {
				show_warning(TTR("An error occurred while trying to save the editor layout.\nMake sure the editor's user data path is writable."));
				return;
			}
			_save_docks_to_config(config, p_file);
			config->save(EditorSettings::get_singleton()->get_editor_layouts_config());
			layout_dialog->hide();
			_update_layouts_menu();
			if (p_file == "Default") {
				show_warning(TTR("Default editor layout overridden.\nTo restore the Default layout to its base settings, use the Delete Layout option and delete the Default layout."));
			}
		} break;
		case SETTINGS_LAYOUT_DELETE: {
			if (p_file.is_empty()) {
				return;