### 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 material;
}
Vector2 CanvasItem::make_canvas_position_local(const Vector2 &screen_point) const {
	ERR_FAIL_COND_V(!is_inside_tree(), screen_point);
	Transform2D local_matrix = (get_canvas_transform() * get_global_transform()).affine_inverse();
	return local_matrix.xform(screen_point);
}
Ref<InputEvent> CanvasItem::make_input_local(const Ref<InputEvent> &p_event) const {
	ERR_FAIL_COND_V(p_event.is_null(), p_event);
	ERR_FAIL_COND_V(!is_inside_tree(), p_event);
	return p_event->xformed_by((get_canvas_transform() * get_global_transform()).affine_inverse());
}
Vector2 CanvasItem::get_global_mouse_position() const {
	ERR_FAIL_COND_V(!get_viewport(), Vector2());
	return get_canvas_transform().affine_inverse().xform(get_viewport()->get_mouse_position());
}
Vector2 CanvasItem::get_local_mouse_position() const {
	ERR_FAIL_COND_V(!get_viewport(), Vector2());
	return get_global_transform().affine_inverse().xform(get_global_mouse_position());
}
void CanvasItem::force_update_transform() {
	ERR_FAIL_COND(!is_inside_tree());
	if (!xform_change.in_list()) {
		return;
	}
	get_tree()->xform_change_list.remove(&xform_change);
	notification(NOTIFICATION_TRANSFORM_CHANGED);
}
void CanvasItem::_bind_methods() {