### Godot version

4.0-beta12

### System information

Windows11 Vulkan API 1.2.0 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080

### Issue description

Can not assign "SpriteFrames" resource file to SpriteFrames attribute in custom resource file, it alert "Recursion detected, unable to assign resource to property."


### Steps to reproduce

Please look uploaded project. try assign new_sprite_frames.tres to frames in custom_res.tres.

### Minimal reproduction project

[GodotCustomRes.zip](https://github.com/godotengine/godot/files/10419770/GodotCustomRes.zip)

} break;
		case Variant::OBJECT: {
			Ref<Resource> r = v;
			if (r.is_null()) {
				return false;
			}
			if (resources_found.has(r.ptr())) {
				return true;
			}
			resources_found.insert(r.ptr());
			List<PropertyInfo> plist;
			r->get_property_list(&plist);
			for (const PropertyInfo &pinfo : plist) {
				if (!(pinfo.usage & PROPERTY_USAGE_STORAGE)) {
					continue;
				}
				if (pinfo.type != Variant::ARRAY && pinfo.type != Variant::DICTIONARY && pinfo.type != Variant::OBJECT) {
					continue;
				}
				if (_find_recursive_resources(r->get(pinfo.name), resources_found)) {
					return true;
				}
			}
		} break;
		default: {
		}
	}
	return false;
}
void EditorPropertyResource::_resource_changed(const Ref<Resource> &p_resource) {