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

center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
	native_shader_source_visualizer = memnew(EditorNativeShaderSourceVisualizer);
	gui_base->add_child(native_shader_source_visualizer);
	orphan_resources = memnew(OrphanResourcesDialog);
	gui_base->add_child(orphan_resources);
	confirmation = memnew(ConfirmationDialog);
	gui_base->add_child(confirmation);
	confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
	save_confirmation = memnew(ConfirmationDialog);
	save_confirmation->add_button(TTR("Don't Save"), DisplayServer::get_singleton()->get_swap_cancel_ok(), "discard");
	gui_base->add_child(save_confirmation);
	save_confirmation->set_min_size(Vector2(450.0 * EDSCALE, 0));
	save_confirmation->connect("confirmed", callable_mp(this, &EditorNode::_menu_confirm_current));
	save_confirmation->connect("custom_action", callable_mp(this, &EditorNode::_discard_changes));
	gradle_build_manage_templates = memnew(ConfirmationDialog);
	gradle_build_manage_templates->set_text(TTR("Android build template is missing, please install relevant templates."));
	gradle_build_manage_templates->set_ok_button_text(TTR("Manage Templates"));
	gradle_build_manage_templates->add_button(TTR("Install from file"))->connect("pressed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_INSTALL_ANDROID_BUILD_TEMPLATE));
	gradle_build_manage_templates->connect("confirmed", callable_mp(this, &EditorNode::_menu_option).bind(SETTINGS_MANAGE_EXPORT_TEMPLATES));
	gui_base->add_child(gradle_build_manage_templates);
	file_android_build_source = memnew(EditorFileDialog);
	file_android_build_source->set_title(TTR("Select Android sources file"));
	file_android_build_source->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
	file_android_build_source->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
	file_android_build_source->add_filter("*.zip");
	file_android_build_source->connect("file_selected", callable_mp(this, &EditorNode::_android_build_source_selected));
	gui_base->add_child(file_android_build_source);
	install_android_build_template = memnew(ConfirmationDialog);
	install_android_build_template->set_text(TTR("This will set up your project for gradle Android builds by installing the source template to \"res:android/build\".\nYou can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).\nNote that in order to make gradle builds instead of using pre-built APKs, the \"Use Gradle Build\" option should be enabled in the Android export preset."));
	install_android_build_template->set_ok_button_text(TTR("Install"));