### Godot version

v4.2.beta2.official [f8818f85e]

### System information

Windows 10, 64bit

### Issue description

Some times can't add node in visualshader editor

### Steps to reproduce

1. Open a VisualShader file for edit.
2. Click the `Add Node...` button, it will popup menu, it is OK.
3. Direct close the menu.
4. Clikd the `Add Node...` again, the menu can't popup.
![GIF](https://github.com/godotengine/godot/assets/35988767/1326c63e-3e05-4423-9ec7-7ce305b3f4f5)

### Minimal reproduction project

/
error_label->set_text("error(" + file + ":" + itos(err_line) + "): " + error_pp);
			shader_error = true;
			return;
		}
	}
	ShaderLanguage sl;
	Error err = sl.compile(preprocessed_code, info);
	if (err != OK) {
		int err_line;
		String err_text;
		Vector<ShaderLanguage::FilePosition> include_positions = sl.get_include_positions();
		if (include_positions.size() > 1) {
			
			err_line = include_positions[0].line;
			err_text = "error(" + itos(err_line) + ") in include " + include_positions[include_positions.size() - 1].file + ":" + itos(include_positions[include_positions.size() - 1].line) + ": " + sl.get_error_text();
		} else {
			err_line = sl.get_error_line();
			err_text = "error(" + itos(err_line) + "): " + sl.get_error_text();
		}
		Color error_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
		preview_text->set_line_background_color(err_line - 1, error_line_color);
		error_panel->show();
		error_label->set_text(err_text);
		shader_error = true;
	} else {
		error_panel->hide();
		shader_error = false;
	}
}
void VisualShaderEditor::_update_next_previews(int p_node_id) {