### 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)

assign->set_disabled(p_read_only);
	clear->set_disabled(p_read_only);
};
String EditorPropertyNodePath::_get_meta_pointer_property() const {
	ERR_FAIL_COND_V(!pointer_mode, String());
	return SceneState::get_meta_pointer_property(get_edited_property());
}
Variant EditorPropertyNodePath::_get_cache_value(const StringName &p_prop, bool &r_valid) const {
	if (p_prop == get_edited_property()) {
		r_valid = true;
		return const_cast<EditorPropertyNodePath *>(this)->get_edited_object()->get(pointer_mode ? StringName(_get_meta_pointer_property()) : get_edited_property(), &r_valid);
	}
	return Variant();
}
StringName EditorPropertyNodePath::_get_revert_property() const {
	if (pointer_mode) {
		return _get_meta_pointer_property();
	} else {
		return get_edited_property();
	}
}
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
	NodePath path = p_path;
	Node *base_node = nullptr;
	if (!use_path_from_scene_root) {