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

return;
	}
	const Ref<InputEventMouseButton> mb = p_ev;
	if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && mb->is_pressed()) {
		if (hovered_index >= 0) {
			
			
			if (value & (1 << hovered_index)) {
				value &= ~(1 << hovered_index);
			} else {
				value |= (1 << hovered_index);
			}
			emit_signal(SNAME("flag_changed"), value);
			queue_redraw();
		} else if (expand_hovered) {
			expanded = !expanded;
			update_minimum_size();
			queue_redraw();
		}
	}
	if (mb.is_valid() && mb->get_button_index() == MouseButton::RIGHT && mb->is_pressed()) {
		if (hovered_index >= 0) {
			renamed_layer_index = hovered_index;
			layer_rename->set_position(get_screen_position() + mb->get_position());
			layer_rename->reset_size();
			layer_rename->popup();
		}
	}
}
void EditorPropertyLayersGrid::_notification(int p_what) {