### 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
if (points.size() < 2) {
		clear_output();
		return;
	}
	ERR_FAIL_COND(tile_aspect <= 0.f);
	const float hw = width / 2.f;
	const float hw_sq = hw * hw;
	const float sharp_limit_sq = sharp_limit * sharp_limit;
	const int len = points.size();
	
	Vector2 pos0 = points[0];
	Vector2 pos1 = points[1];
	Vector2 f0 = (pos1 - pos0).normalized();
	Vector2 u0 = rotate90(f0);
	Vector2 pos_up0 = pos0;
	Vector2 pos_down0 = pos0;
	Color color0;
	Color color1;
	float current_distance0 = 0.f;
	float current_distance1 = 0.f;
	float total_distance = 0.f;
	float width_factor = 1.f;
	_interpolate_color = gradient != nullptr;
	bool retrieve_curve = curve != nullptr;
	bool distance_required = _interpolate_color ||
			retrieve_curve ||
			texture_mode == Line2D::LINE_TEXTURE_TILE ||