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

switch (p_what) {
		case NOTIFICATION_DRAW: {
			Size2 grid_size = get_grid_size();
			grid_size.x = get_size().x;
			flag_rects.clear();
			int prev_expansion_rows = expansion_rows;
			expansion_rows = 0;
			const int bsize = (grid_size.height * 80 / 100) / 2;
			const int h = bsize * 2 + 1;
			Color color = get_theme_color(read_only ? SNAME("disabled_highlight_color") : SNAME("highlight_color"), SNAME("Editor"));
			Color text_color = get_theme_color(read_only ? SNAME("disabled_font_color") : SNAME("font_color"), SNAME("Editor"));
			text_color.a *= 0.5;