### Godot version

v4.1.beta1.official [828ec2c5d]

### System information

Windows 11 Home, v4.1.beta1.official [828ec2c5d], All Renderers, NVidia GeForce RTX 3060 Ti,  Drivers 535.98

### Issue description

When enabling the "Y Sort Enabled" ordering method for a Sprite2D, the sprite will be rendered entirely black.

![grafik](https://github.com/godotengine/godot/assets/29011290/6fa4da16-d9a5-4c3b-a9e4-c1bba53c2183)
![grafik](https://github.com/godotengine/godot/assets/29011290/cbf499ae-f3f7-4c07-98b2-a1a667d810c2)


### Steps to reproduce

Simply create a Sprite2D Node, assign any texture to it and activate Y-Sorting

### Minimal reproduction project

[GDB_4.1_ysort.zip](https://github.com/godotengine/godot/files/11704361/GDB_4.1_ysort.zip)

if (ci->canvas_group->fit_empty && (ci->commands == nullptr || (ci->commands->next == nullptr && ci->commands->type == RendererCanvasCull::Item::Command::TYPE_RECT && (static_cast<RendererCanvasCull::Item::CommandRect *>(ci->commands)->flags & RendererCanvasRender::CANVAS_RECT_IS_GROUP)))) {
				
				ci->clear();
				if (rect_accum == Rect2()) {
					rect_accum.size = Size2(1, 1);
				}
				rect_accum = rect_accum.grow(ci->canvas_group->fit_margin);
				
				RendererCanvasRender::Item::CommandRect *crect = ci->alloc_command<RendererCanvasRender::Item::CommandRect>();
				crect->flags = RendererCanvasRender::CANVAS_RECT_IS_GROUP; 
				crect->rect = xform.affine_inverse().xform(rect_accum);
				crect->modulate = Color(1, 1, 1, 1);
				
				global_rect = rect_accum.grow(ci->canvas_group->clear_margin); 
				global_rect.position += p_clip_rect.position;
			} else {
				global_rect.position -= p_clip_rect.position;
				global_rect = global_rect.merge(rect_accum); 
				global_rect = global_rect.grow(ci->canvas_group->clear_margin); 
				global_rect.position += p_clip_rect.position;
			}
			
			
			canvas_group_from->canvas_group_owner = ci;
		}
	}
	if (((ci->commands != nullptr || ci->visibility_notifier) && p_clip_rect.intersects(global_rect, true)) || ci->vp_render || ci->copy_back_buffer) {