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

}
	warning = memnew(Button);
	warning->set_text(TTR("Temporary Euler may be changed implicitly!"));
	warning->set_clip_text(true);
	warning->connect("pressed", callable_mp(this, &EditorPropertyQuaternion::_warning_pressed));
	warning_dialog = memnew(AcceptDialog);
	add_child(warning_dialog);
	warning_dialog->set_text(TTR("Temporary Euler will not be stored in the object with the original value. Instead, it will be stored as Quaternion with irreversible conversion.\nThis is due to the fact that the result of Euler->Quaternion can be determined uniquely, but the result of Quaternion->Euler can be multi-existent."));
	euler_label = memnew(Label);
	euler_label->set_text("Temporary Euler");
	edit_custom_bc->add_child(warning);
	edit_custom_bc->add_child(edit_custom_layout);
	edit_custom_layout->add_child(euler_label);
	for (int i = 0; i < 3; i++) {
		euler[i] = memnew(EditorSpinSlider);
		euler[i]->set_flat(true);
		euler[i]->set_label(desc[i]);
		edit_custom_layout->add_child(euler[i]);
		add_focusable(euler[i]);
		euler[i]->connect("value_changed", callable_mp(this, &EditorPropertyQuaternion::_custom_value_changed));
		if (horizontal) {
			euler[i]->set_h_size_flags(SIZE_EXPAND_FILL);
		}
	}
	edit_button = memnew(Button);
	edit_button->set_flat(true);
	edit_button->set_toggle_mode(true);
	default_layout->add_child(edit_button);
	edit_button->connect("pressed", callable_mp(this, &EditorPropertyQuaternion::_edit_custom_value));
	add_focusable(edit_button);