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

Item::CommandPrimitive *left_border = canvas_item->alloc_command<Item::CommandPrimitive>();
			ERR_FAIL_COND(!left_border);
			left_border->points[0] = begin_left;
			left_border->points[1] = begin_left + border;
			left_border->points[2] = end_left + border;
			left_border->points[3] = end_left;
			left_border->colors[0] = p_color;
			left_border->colors[1] = transparent;
			left_border->colors[2] = transparent;
			left_border->colors[3] = p_color;
			left_border->point_count = 4;
		}
		{
			Item::CommandPrimitive *right_border = canvas_item->alloc_command<Item::CommandPrimitive>();
			ERR_FAIL_COND(!right_border);
			right_border->points[0] = begin_right;
			right_border->points[1] = begin_right - border;
			right_border->points[2] = end_right - border;
			right_border->points[3] = end_right;
			right_border->colors[0] = p_color;
			right_border->colors[1] = transparent;
			right_border->colors[2] = transparent;
			right_border->colors[3] = p_color;
			right_border->point_count = 4;
		}
		{
			Item::CommandPrimitive *top_border = canvas_item->alloc_command<Item::CommandPrimitive>();
			ERR_FAIL_COND(!top_border);
			top_border->points[0] = begin_left;
			top_border->points[1] = begin_left + border2;