### Godot version

3.5.1 custom build

### System information

N/A

### Issue description

When using Line2D, I noticed a discrepancy with UVs depending on the end cap mode.

Here are some examples using a tiled repeating texture:

### No capping ✔️ 
![image](https://user-images.githubusercontent.com/95356449/218230984-e5d507d4-7af7-4967-aee7-79c8daa206ff.png)

### Begin cap: Box ✔️ 
![image](https://user-images.githubusercontent.com/95356449/218231092-311370cc-7ff8-4699-976b-c4581eaada0a.png)

### End cap: Box ❌ 
![image](https://user-images.githubusercontent.com/95356449/218231131-00ddf4f7-2a9a-4740-a445-a8601ab026e1.png)


### Steps to reproduce

Create a Line2D
Add a texture with repeating enabled
Set end cap mode to Box

### Minimal reproduction project

not needed, bugfix pr incoming
texture_mode == Line2D::LINE_TEXTURE_STRETCH;
	if (distance_required) {
		total_distance = calculate_total_distance(points);
		
		
		if (begin_cap_mode == Line2D::LINE_CAP_BOX || begin_cap_mode == Line2D::LINE_CAP_ROUND) {
			if (retrieve_curve) {
				total_distance += width * curve->sample_baked(0.f) * 0.5f;
			} else {
				total_distance += width * 0.5f;
			}
		}
		if (end_cap_mode == Line2D::LINE_CAP_BOX || end_cap_mode == Line2D::LINE_CAP_ROUND) {
			if (retrieve_curve) {
				total_distance += width * curve->sample_baked(1.f) * 0.5f;
			} else {
				total_distance += width * 0.5f;
			}
		}
	}
	if (_interpolate_color) {
		color0 = gradient->get_color(0);
	} else {
		colors.push_back(default_color);
	}
	float uvx0 = 0.f;
	float uvx1 = 0.f;
	if (retrieve_curve) {
		width_factor = curve->sample_baked(0.f);
	}