### Godot version

v4.0.beta10.official [d0398f62f]

### System information

linux mint Vulkan API 1.3.194 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti, Vulkan API 1.3.194 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1660 Ti

### Issue description

draw_dashed line fills the ending up instead leaving unpainted, maybe intended to draw more closed dashed rectangles, but i would call this a bug. If its intended the docs should mention this and i would like to see an option to turn this behavior off.
For example to use this for drawing multicolored dashed lines it would be a unwanted.

big dashed line length 119
![grafik](https://user-images.githubusercontent.com/8441455/211654997-0bd59f52-1429-431d-aa44-a3067e87124f.png)

big dashed line length 120
![grafik](https://user-images.githubusercontent.com/8441455/211655381-a279d25e-40eb-4f31-b613-fe141f72416f.png)

Below is shown lengths from 1 to 200

### Steps to reproduce

Run this lines to draw dashed lines:

```
	for i in range(0,200,2):
		self.draw_dashed_line(topleft + Vector2(0, i),
		topleft + Vector2(i, i),
		Color(1,1,1,1), 1, 10)
```

### Minimal reproduction project

-
return z_relative;
}
int CanvasItem::get_z_index() const {
	return z_index;
}
void CanvasItem::set_y_sort_enabled(bool p_enabled) {
	y_sort_enabled = p_enabled;
	RS::get_singleton()->canvas_item_set_sort_children_by_y(canvas_item, y_sort_enabled);
}
bool CanvasItem::is_y_sort_enabled() const {
	return y_sort_enabled;
}
void CanvasItem::draw_dashed_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, real_t p_width, real_t p_dash) {
	ERR_FAIL_COND_MSG(!drawing, "Drawing is only allowed inside NOTIFICATION_DRAW, _draw() function or 'draw' signal.");
	float length = (p_to - p_from).length();
	if (length < p_dash) {
		RenderingServer::get_singleton()->canvas_item_add_line(canvas_item, p_from, p_to, p_color, p_width);
		return;
	}
	Point2 off = p_from;
	Vector2 step = p_dash * (p_to - p_from).normalized();
	int steps = length / p_dash / 2;
	for (int i = 0; i < steps; i++) {
		RenderingServer::get_singleton()->canvas_item_add_line(canvas_item, off, (off + step), p_color, p_width);
		off += 2 * step;
	}
	RenderingServer::get_singleton()->canvas_item_add_line(canvas_item, off, p_to, p_color, p_width);
}
void CanvasItem::draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, real_t p_width, bool p_antialiased) {