### Godot version

v4.0.beta10.mono.official [d0398f62f]

### System information

Windows 11

### Issue description

I am experiencing a runtime crash in my game which logs the following error:

```
ERROR: FATAL: Condition "!match" is true.
   at: ~CSharpInstance (modules/mono/csharp_script.cpp:2015)
Fatal error. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.
   at Godot.NativeInterop.NativeFuncs.godotsharp_internal_refcounted_disposed(IntPtr, IntPtr, Godot.NativeInterop.godot)
   at Godot.Object.Dispose(Boolean)
   at Godot.Object.Finalize()
```
There is no other output alongside this error.

I am using several `RefCounted` objects throughout my game and the error seems to be related. I'm using `RefCounted` 
 primarily as a way to pass my own C# objects as signal arguments.

~~My project is fairly complex so I'm having a hard time isolating the issue. The crash doesn't happen immediately, but rather it usually happens after a minute or so of playing the game. It also seems quite inconsistent - sometimes I can play for several minutes before the crash. There's probably a very specific combination of events I need to identify in order to reproduce the issue consistently.~~

~~I know this report isn't super helpful but I've been trying to isolate the issue for the past several hours with no luck. I figured I'd log it for now and update with an MRP if/when I find out how to reproduce.~~

I've now uploaded an MRP below. I still haven't been able to identify the exact cause but I am hoping the MRP is stripped down enough to make debugging easier.

I have confirmed the crash happens in betas 8 and 9 as well.

### Steps to reproduce

Unknown

### Minimal reproduction project

[Crash MRP.zip](https://github.com/godotengine/godot/files/10304593/Crash.MRP.zip)

Run the MRP for ~30 seconds and observe the crash. Also, you can remove `WanderTravelDefinition` from the `EnemyFlyingOrbBullet` to observe that the crash no longer happens.

p_script->base_script = base_script;
}
bool CSharpScript::can_instantiate() const {
#ifdef TOOLS_ENABLED
	bool extra_cond = tool || ScriptServer::is_scripting_enabled();
#else
	bool extra_cond = true;
#endif
	 Need to think this through better.
	// For tool scripts, this will never fire if the class is not found. That's because we
	// don't know if it's a tool script if we can't find the class to access the attributes.
	if (extra_cond && !valid) {
		ERR_FAIL_V_MSG(false, "Cannot instance script because the associated class could not be found. Script: '" + get_path() + "'. Make sure the script exists and contains a class definition with a name that matches the filename of the script exactly (it's case-sensitive).");
	}
	return valid && extra_cond;
}
StringName CSharpScript::get_instance_base_type() const {
	StringName native_name;
	GDMonoCache::managed_callbacks.ScriptManagerBridge_GetScriptNativeName(this, &native_name);
	return native_name;
}
CSharpInstance *CSharpScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, bool p_is_ref_counted, Callable::CallError &r_error) {
	/* STEP 1, CREATE */
	Ref<RefCounted> ref;
	if (p_is_ref_counted) {
		// Hold it alive. Important if we have to dispose a script instance binding before creating the CSharpInstance.
		ref = Ref<RefCounted>(static_cast<RefCounted *>(p_owner));
	}
	// If the object had a script instance binding, dispose it before adding the CSharpInstance
	if (CSharpLanguage::has_instance_binding(p_owner)) {