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

colors.resize(polyline_point_count + ((p_antialiased && !loop) ? 4 : 0));
	points.resize(polyline_point_count + ((p_antialiased && !loop) ? 4 : 0));
	Vector2 *points_ptr = points.ptrw();
	Color *colors_ptr = colors.ptrw();
	if (p_antialiased) {
		
		
		
		
		float border_size = 1.25f;
		if (p_width < 1.0f) {
			border_size *= p_width;
		}
		Color color2 = Color(1, 1, 1, 0);
		Item::CommandPolygon *pline_left = canvas_item->alloc_command<Item::CommandPolygon>();
		ERR_FAIL_COND(!pline_left);
		Item::CommandPolygon *pline_right = canvas_item->alloc_command<Item::CommandPolygon>();
		ERR_FAIL_COND(!pline_right);
		PackedColorArray colors_left;
		PackedVector2Array points_left;
		PackedColorArray colors_right;
		PackedVector2Array points_right;
		
		
		colors_left.resize(polyline_point_count + (loop ? 0 : 5));
		points_left.resize(polyline_point_count + (loop ? 0 : 5));
		colors_right.resize(polyline_point_count + (loop ? 0 : 5));
		points_right.resize(polyline_point_count + (loop ? 0 : 5));
		Color *colors_left_ptr = colors_left.ptrw();
		Vector2 *points_left_ptr = points_left.ptrw();