### 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();
    }
}


```


CRASH_COND(gchandle.get_intptr().value != p_old_gchandle.value);
	CSharpLanguage::get_singleton()->release_script_gchandle(gchandle);
	script_binding.inited = false;
	
#ifdef DEBUG_ENABLED
	CRASH_COND(script_binding.type_name == StringName());
#endif
	bool parent_is_object_class = ClassDB::is_parent_class(p_unmanaged->get_class_name(), script_binding.type_name);
	ERR_FAIL_COND_V_MSG(!parent_is_object_class, { nullptr },
			"Type inherits from native type '" + script_binding.type_name + "', so it can't be instantiated in object of type: '" + p_unmanaged->get_class() + "'.");
	GCHandleIntPtr strong_gchandle =
			GDMonoCache::managed_callbacks.ScriptManagerBridge_CreateManagedForGodotObjectBinding(
					&script_binding.type_name, p_unmanaged);
	ERR_FAIL_NULL_V(strong_gchandle.value, { nullptr });
	gchandle = MonoGCHandleData(strong_gchandle, gdmono::GCHandleType::STRONG_HANDLE);
	script_binding.inited = true;
	
	RefCounted *rc = Object::cast_to<RefCounted>(p_unmanaged);
	if (rc) {
		
		
		
		
		rc->reference();
		CSharpLanguage::get_singleton()->post_unsafe_reference(rc);
	}
	return gchandle.get_intptr();
}
void godotsharp_internal_tie_native_managed_to_unmanaged(GCHandleIntPtr p_gchandle_intptr, Object *p_unmanaged, const StringName *p_native_name, bool p_ref_counted) {