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

uint32_t value = get_edited_object()->get(get_edited_property());
	for (int i = 0; i < flags.size(); i++) {
		flags[i]->set_pressed((value & flag_values[i]) == flag_values[i]);
	}
}
void EditorPropertyFlags::setup(const Vector<String> &p_options) {
	ERR_FAIL_COND(flags.size());
	bool first = true;
	uint32_t current_val;
	for (int i = 0; i < p_options.size(); i++) {
		
		String option = p_options[i].strip_edges();
		if (option.is_empty()) {
			continue;
		}
		const int flag_index = flags.size(); 
		
		Vector<String> text_split = p_options[i].split(":");
		if (text_split.size() != 1) {
			current_val = text_split[1].to_int();
		} else {
			current_val = 1 << i;
		}
		flag_values.push_back(current_val);
		
		CheckBox *cb = memnew(CheckBox);
		cb->set_text(option);
		cb->set_clip_text(true);