### Godot version

v4.1.beta

### System information

Windows 10

### Issue description

```
        virtual Ref<Script> get_script() const override {
                if (native_info->get_script_func) {
                        GDExtensionObjectPtr script = native_info->get_script_func(instance);
                        return Ref<Script>(reinterpret_cast<Script *>(script));
                }
                return Ref<Script>();
```
Is not creating a functional reference.

GDExtensionObjectPtr is a part of gdextension_interface and is a void pointer to pas data pointers between GDExtesion and Godot Core.

In the images below you are able to see that the extension `reinterpret_cast `works fine.
And that the pointer is passed to core.
However at core `Ref<Script> script_test` stays a NULL value

![image](https://github.com/godotengine/godot/assets/20573784/d4a955d3-4e02-46e2-abf1-ba88cf501e8f)
![image](https://github.com/godotengine/godot/assets/20573784/42a3fbb8-3598-479a-86bc-8b9464624885)
![image](https://github.com/godotengine/godot/assets/20573784/620782c0-192c-4e14-829c-5817ae680378)

I was hoping this would be solved by solving [cpp 1119](https://github.com/godotengine/godot-cpp/issues/1119)



### Steps to reproduce

Create a custom script instance and create it using `internal::gdextension_interface_script_instance_create` and a `GDExtensionScriptInstanceInfo` that only implements `get_property_list_func` and `get_script_func`.

### Minimal reproduction project

Difficult to create a minimal project.
Mostly looking for advice on what to test to find the actual source problem
GDExtensionPtr<void> ret = nullptr;
		GDVIRTUAL_REQUIRED_CALL(_instance_create, p_this, ret);
		return reinterpret_cast<ScriptInstance *>(ret.operator void *());
	}
	GDVIRTUAL1RC(GDExtensionPtr<void>, _placeholder_instance_create, Object *)
	PlaceHolderScriptInstance *placeholder_instance_create(Object *p_this) override {
		GDExtensionPtr<void> ret = nullptr;
		GDVIRTUAL_REQUIRED_CALL(_placeholder_instance_create, p_this, ret);
		return reinterpret_cast<PlaceHolderScriptInstance *>(ret.operator void *());
	}
	EXBIND1RC(bool, instance_has, const Object *)
	EXBIND0RC(bool, has_source_code)
	EXBIND0RC(String, get_source_code)
	EXBIND1(set_source_code, const String &)
	EXBIND1R(Error, reload, bool)
	GDVIRTUAL0RC(TypedArray<Dictionary>, _get_documentation)
#ifdef TOOLS_ENABLED
	virtual Vector<DocData::ClassDoc> get_documentation() const override {
		TypedArray<Dictionary> doc;
		GDVIRTUAL_REQUIRED_CALL(_get_documentation, doc);
		Vector<DocData::ClassDoc> class_doc;
		for (int i = 0; i < doc.size(); i++) {
			class_doc.append(DocData::ClassDoc::from_dict(doc[i]));
		}
		return class_doc;
	}
#endif 
	EXBIND1RC(bool, has_method, const StringName &)
	GDVIRTUAL1RC(Dictionary, _get_method_info, const StringName &)
	virtual MethodInfo get_method_info(const StringName &p_method) const override {