### 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
Node *new_parent = p_new_parent;
	ERR_FAIL_COND(!new_parent);
	if (p_nodes.size() == 0) {
		return; 
	}
	p_nodes.sort_custom<Node::Comparator>(); 
	bool no_change = true;
	for (int ni = 0; ni < p_nodes.size(); ni++) {
		if (p_nodes[ni] == p_new_parent) {
			return; 
		}
		if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_index()) {
			no_change = false;
		}
	}
	if (no_change) {
		return; 
	}
	Node *validate = new_parent;
	while (validate) {
		ERR_FAIL_COND_MSG(p_nodes.has(validate), "Selection changed at some point. Can't reparent.");
		validate = validate->get_parent();
	}
	
	p_nodes.sort_custom<Node::Comparator>();
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Reparent Node"), UndoRedo::MERGE_DISABLE, p_nodes[0]);
	HashMap<Node *, NodePath> path_renames;
	Vector<StringName> former_names;
	int inc = 0;