### 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
undo_redo->create_action(TTR("Duplicate Node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get());
			undo_redo->add_do_method(editor_selection, "clear");
			Node *dupsingle = nullptr;
			selection.sort_custom<Node::Comparator>();
			Node *add_below_node = selection.back()->get();
			for (Node *node : selection) {
				Node *parent = node->get_parent();
				List<Node *> owned;
				node->get_owned_by(node->get_owner(), &owned);
				HashMap<const Node *, Node *> duplimap;
				Node *dup = node->duplicate_from_editor(duplimap);
				ERR_CONTINUE(!dup);
				if (selection.size() == 1) {
					dupsingle = dup;
				}
				dup->set_name(parent->validate_child_name(dup));
				undo_redo->add_do_method(add_below_node, "add_sibling", dup, true);
				for (Node *F : owned) {
					if (!duplimap.has(F)) {
						continue;
					}
					Node *d = duplimap[F];
					undo_redo->add_do_method(d, "set_owner", node->get_owner());
				}
				undo_redo->add_do_method(editor_selection, "add_node", dup);
				undo_redo->add_undo_method(parent, "remove_child", dup);
				undo_redo->add_do_reference(dup);
				EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
				undo_redo->add_do_method(ed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
				undo_redo->add_undo_method(ed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)).path_join(dup->get_name())));