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

spin = memnew(EditorSpinSlider);
	spin->set_flat(true);
	add_child(spin);
	add_focusable(spin);
	spin->connect("value_changed", callable_mp(this, &EditorPropertyInteger::_value_changed));
}
void EditorPropertyObjectID::_set_read_only(bool p_read_only) {
	edit->set_disabled(p_read_only);
}
void EditorPropertyObjectID::_edit_pressed() {
	emit_signal(SNAME("object_id_selected"), get_edited_property(), get_edited_object()->get(get_edited_property()));
}
void EditorPropertyObjectID::update_property() {
	String type = base_type;
	if (type.is_empty()) {
		type = "Object";
	}
	ObjectID id = get_edited_object()->get(get_edited_property());
	if (id.is_valid()) {
		edit->set_text(type + " ID: " + uitos(id));
		edit->set_disabled(false);
		edit->set_icon(EditorNode::get_singleton()->get_class_icon(type));
	} else {
		edit->set_text(TTR("<empty>"));
		edit->set_disabled(true);
		edit->set_icon(Ref<Texture2D>());
	}
}
void EditorPropertyObjectID::setup(const String &p_base_type) {