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

String s = get_edited_object()->get(get_edited_property());
	property->set_text(s);
	selected_type = s;
}
void EditorPropertyClassName::_property_selected() {
	dialog->popup_create(true);
}
void EditorPropertyClassName::_dialog_created() {
	selected_type = dialog->get_selected_type();
	emit_changed(get_edited_property(), selected_type);
	update_property();
}
void EditorPropertyClassName::_bind_methods() {
}
EditorPropertyClassName::EditorPropertyClassName() {
	property = memnew(Button);
	property->set_clip_text(true);
	add_child(property);
	add_focusable(property);
	property->set_text(selected_type);
	property->connect("pressed", callable_mp(this, &EditorPropertyClassName::_property_selected));
	dialog = memnew(CreateDialog);
	dialog->set_base_type(base_type);
	dialog->connect("create", callable_mp(this, &EditorPropertyClassName::_dialog_created));
	add_child(dialog);
}
void EditorPropertyCheck::_set_read_only(bool p_read_only) {