### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Debian GNU/Linux trixie/sid trixie - Vulkan (Compatibility) - Mesa Intel(R) HD Graphics 520 (SKL GT2) () - Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz (4 Threads)

### Issue description

After right clicking in thet "Filter Nodes" menu in the scene tree dock, the sub-menu is populated with a "Search" icon.

If I later switch themes in the same session, this icon is never updated to match the new theme.

![image](https://github.com/godotengine/godot/assets/660911/14336bb3-12ca-48c8-b030-8ada6ac27ec6)


### Steps to reproduce

1. Right click in the "Filter Nodes" menu in scene tree dock
2. Switch themes
3. Right click again in the "Filter Nodes" menu

Expected result: Icon has updated to match the theme I am currently using
Actual result: Icon is still using the theme I launched Godot with

### Minimal reproduction project

N/A
resource_drop_path = res_path;
			const EditorPropertyNameProcessor::Style style = InspectorDock::get_singleton()->get_property_name_style();
			menu_properties->clear();
			for (const String &p : valid_properties) {
				menu_properties->add_item(EditorPropertyNameProcessor::get_singleton()->process_name(p, style));
				menu_properties->set_item_metadata(-1, p);
			}
			menu_properties->reset_size();
			menu_properties->set_position(get_screen_position() + get_local_mouse_position());
			menu_properties->popup();
		} else if (!valid_properties.is_empty()) {
			_perform_property_drop(node, valid_properties[0], ResourceLoader::load(res_path));
		}
	}
}
void SceneTreeDock::_script_dropped(String p_file, NodePath p_to) {
	Ref<Script> scr = ResourceLoader::load(p_file);
	ERR_FAIL_COND(!scr.is_valid());
	Node *n = get_node(p_to);
	if (!n) {
		return;
	}
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	if (Input::get_singleton()->is_key_pressed(Key::CTRL)) {
		Object *obj = ClassDB::instantiate(scr->get_instance_base_type());
		ERR_FAIL_NULL(obj);
		Node *new_node = Object::cast_to<Node>(obj);
		if (!new_node) {
			if (!obj->is_ref_counted()) {
				memdelete(obj);