### 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

/
for (int i = 0; i < MAX_FLOAT_CONST_DEFS; i++) {
		if (Math::is_equal_approx(p_constant, float_constant_defs[i].value)) {
			return i + 1;
		}
	}
	return 0;
}
void VisualShaderGraphPlugin::set_expression(VisualShader::Type p_type, int p_node_id, const String &p_expression) {
	if (p_type != visual_shader->get_shader_type() || !links.has(p_node_id) || !links[p_node_id].expression_edit) {
		return;
	}
	links[p_node_id].expression_edit->set_text(p_expression);
}
Ref<Script> VisualShaderGraphPlugin::get_node_script(int p_node_id) const {
	if (!links.has(p_node_id)) {
		return Ref<Script>();
	}
	Ref<VisualShaderNodeCustom> custom = Ref<VisualShaderNodeCustom>(links[p_node_id].visual_node);
	if (custom.is_valid()) {
		return custom->get_script();
	}
	return Ref<Script>();
}
void VisualShaderGraphPlugin::update_node_size(int p_node_id) {