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

ERR_FAIL_COND(p_points.size() < 2);
	Item *canvas_item = canvas_item_owner.get_or_null(p_item);
	ERR_FAIL_COND(!canvas_item);
	Color color = Color(1, 1, 1, 1);
	Vector<int> indices;
	int point_count = p_points.size();
	Item::CommandPolygon *pline = canvas_item->alloc_command<Item::CommandPolygon>();
	ERR_FAIL_COND(!pline);
	if (p_width < 0) {
		if (p_antialiased) {
			WARN_PRINT("Antialiasing is not supported for thin polylines drawn using line strips (`p_width < 0`).");
		}
		pline->primitive = RS::PRIMITIVE_LINE_STRIP;
		if (p_colors.size() == 1 || p_colors.size() == point_count) {
			pline->polygon.create(indices, p_points, p_colors);
		} else {
			Vector<Color> colors;
			if (p_colors.is_empty()) {
				colors.push_back(color);
			} else {
				colors.resize(point_count);
				Color *colors_ptr = colors.ptrw();
				for (int i = 0; i < point_count; i++) {
					if (i < p_colors.size()) {