### 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
button_tree_menu = memnew(MenuButton);
	button_tree_menu->set_flat(true);
	button_tree_menu->set_tooltip_text(TTR("Extra scene options."));
	button_tree_menu->connect("about_to_popup", callable_mp(this, &SceneTreeDock::_update_tree_menu));
	filter_hbc->add_child(button_tree_menu);
	PopupMenu *tree_menu = button_tree_menu->get_popup();
	tree_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
	button_hb = memnew(HBoxContainer);
	vbc->add_child(button_hb);
	edit_remote = memnew(Button);
	edit_remote->set_flat(true);
	button_hb->add_child(edit_remote);
	edit_remote->set_h_size_flags(SIZE_EXPAND_FILL);
	edit_remote->set_text(TTR("Remote"));
	edit_remote->set_toggle_mode(true);
	edit_remote->set_tooltip_text(TTR("If selected, the Remote scene tree dock will cause the project to stutter every time it updates.\nSwitch back to the Local scene tree dock to improve performance."));
	edit_remote->connect("pressed", callable_mp(this, &SceneTreeDock::_remote_tree_selected));
	edit_local = memnew(Button);
	edit_local->set_flat(true);
	button_hb->add_child(edit_local);
	edit_local->set_h_size_flags(SIZE_EXPAND_FILL);
	edit_local->set_text(TTR("Local"));
	edit_local->set_toggle_mode(true);
	edit_local->set_pressed(true);
	edit_local->connect("pressed", callable_mp(this, &SceneTreeDock::_local_tree_selected));
	remote_tree = nullptr;
	button_hb->hide();
	create_root_dialog = memnew(VBoxContainer);
	vbc->add_child(create_root_dialog);
	create_root_dialog->set_v_size_flags(SIZE_EXPAND_FILL);