### 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_name = p_string_name;
	loose_mode = p_loose_mode;
	options.clear();
	if (loose_mode) {
		
		option_button->add_item("", options.size() + 1000);
	}
	for (int i = 0; i < p_options.size(); i++) {
		options.append(p_options[i]);
		option_button->add_item(p_options[i], i);
	}
	if (loose_mode) {
		edit_button->show();
	}
}
void EditorPropertyTextEnum::_bind_methods() {