### Godot version

4.0.2

### System information

Windows 10

### Issue description

If an error in the Debugger/Errors menu caused by a C# script is selected every time the project is executed a "Save Resource As" menu appears.
![Erro1](https://user-images.githubusercontent.com/6534007/234107005-1455895e-50d3-452a-b153-dae219f98211.PNG)
![Erro2](https://user-images.githubusercontent.com/6534007/234107008-315b7fed-d0ef-4573-ad76-9f0992f83a51.PNG)


The only way to stop it for appearing is restarting Godot.

### Steps to reproduce

1. Execute a C# script with an error
2. Select the error in the Debugger/Errors menu
3. Click "run project"
4. A "Save Resource As" menu appears.

### Minimal reproduction project

Example code with error:

```csharp
using Godot;
using System;

public partial class ErrorTest : Node 
{
    public override void _Ready() 
    {
        Node nullNode = null;

        nullNode.ToString();
    }
}


```


#ifdef DEBUG_ENABLED
	CRASH_COND(p_ptr == nullptr);
	
	CRASH_COND(!Object::cast_to<RefCounted>(p_ptr));
#endif
	RefCounted *rc = static_cast<RefCounted *>(p_ptr);
	if (rc->get_script_instance()) {
		CSharpInstance *cs_instance = CAST_CSHARP_INSTANCE(rc->get_script_instance());
		if (cs_instance) {
			if (!cs_instance->is_destructing_script_instance()) {
				bool delete_owner;
				bool remove_script_instance;
				cs_instance->mono_object_disposed_baseref(p_gchandle_to_free, p_is_finalizer,
						delete_owner, remove_script_instance);
				if (delete_owner) {
					memdelete(rc);
				} else if (remove_script_instance) {
					rc->set_script_instance(nullptr);
				}
			}
			return;
		}
	}
	
	
	CSharpLanguage::get_singleton()->pre_unsafe_unreference(rc);
	if (rc->unreference()) {
		memdelete(rc);
	} else {
		void *data = CSharpLanguage::get_existing_instance_binding(rc);