### Godot version

v4.2.dev4.mono.official [549fcce5f]

### System information

window10 64bit

### Issue description

![GIF 2023-9-1 22-39-07](https://github.com/godotengine/godot/assets/35988767/d7be4a45-f5f0-4408-8758-f4bf9f3c9c5d)


### Steps to reproduce

/

### Minimal reproduction project

/
mode_thumbnails->set_icon(theme_cache.mode_thumbnails);
	mode_list->set_icon(theme_cache.mode_list);
	if (is_layout_rtl()) {
		dir_prev->set_icon(theme_cache.forward_folder);
		dir_next->set_icon(theme_cache.back_folder);
	} else {
		dir_prev->set_icon(theme_cache.back_folder);
		dir_next->set_icon(theme_cache.forward_folder);
	}
	dir_up->set_icon(theme_cache.parent_folder);
	refresh->set_icon(theme_cache.reload);
	favorite->set_icon(theme_cache.favorite);
	show_hidden->set_icon(theme_cache.toggle_hidden);
	fav_up->set_icon(theme_cache.favorites_up);
	fav_down->set_icon(theme_cache.favorites_down);
}
void EditorFileDialog::_favorite_selected(int p_idx) {