### 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 (p_src_rect.size.y < 0) {
		rect->flags ^= RendererCanvasRender::CANVAS_RECT_FLIP_V;
		rect->source.size.y = -rect->source.size.y;
	}
	if (p_transpose) {
		rect->flags |= RendererCanvasRender::CANVAS_RECT_TRANSPOSE;
		SWAP(rect->rect.size.x, rect->rect.size.y);
	}
	if (p_clip_uv) {
		rect->flags |= RendererCanvasRender::CANVAS_RECT_CLIP_UV;
	}
}
void RendererCanvasCull::canvas_item_add_nine_patch(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector2 &p_topleft, const Vector2 &p_bottomright, RS::NinePatchAxisMode p_x_axis_mode, RS::NinePatchAxisMode p_y_axis_mode, bool p_draw_center, const Color &p_modulate) {
	Item *canvas_item = canvas_item_owner.get_or_null(p_item);
	ERR_FAIL_COND(!canvas_item);
	Item::CommandNinePatch *style = canvas_item->alloc_command<Item::CommandNinePatch>();
	ERR_FAIL_COND(!style);
	style->texture = p_texture;
	style->rect = p_rect;
	style->source = p_source;
	style->draw_center = p_draw_center;
	style->color = p_modulate;
	style->margin[SIDE_LEFT] = p_topleft.x;
	style->margin[SIDE_TOP] = p_topleft.y;
	style->margin[SIDE_RIGHT] = p_bottomright.x;
	style->margin[SIDE_BOTTOM] = p_bottomright.y;
	style->axis_x = p_x_axis_mode;
	style->axis_y = p_y_axis_mode;
}
void RendererCanvasCull::canvas_item_add_primitive(RID p_item, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture) {