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

option_button->set_disabled(p_read_only);
	edit_button->set_disabled(p_read_only);
}
void EditorPropertyTextEnum::_emit_changed_value(String p_string) {
	if (string_name) {
		emit_changed(get_edited_property(), StringName(p_string));
	} else {
		emit_changed(get_edited_property(), p_string);
	}
}
void EditorPropertyTextEnum::_option_selected(int p_which) {
	_emit_changed_value(option_button->get_item_text(p_which));
}
void EditorPropertyTextEnum::_edit_custom_value() {
	default_layout->hide();
	edit_custom_layout->show();
	custom_value_edit->grab_focus();
}
void EditorPropertyTextEnum::_custom_value_submitted(String p_value) {
	edit_custom_layout->hide();
	default_layout->show();
	_emit_changed_value(p_value.strip_edges());
}
void EditorPropertyTextEnum::_custom_value_accepted() {
	String new_value = custom_value_edit->get_text().strip_edges();
	_custom_value_submitted(new_value);
}
void EditorPropertyTextEnum::_custom_value_cancelled() {