### 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
corner_pos_down = corner_pos_in;
		}
		Line2D::LineJointMode current_joint_mode = joint_mode;
		Vector2 pos_up1, pos_down1;
		if (intersection_result == SEGMENT_INTERSECT) {
			
			float width_factor_sq = width_factor * width_factor;
			if (current_joint_mode == Line2D::LINE_JOINT_SHARP && corner_pos_out.distance_squared_to(pos1) / (hw_sq * width_factor_sq) > sharp_limit_sq) {
				current_joint_mode = Line2D::LINE_JOINT_BEVEL;
			}
			if (current_joint_mode == Line2D::LINE_JOINT_SHARP) {
				
				
				pos_up1 = corner_pos_up;
				pos_down1 = corner_pos_down;
			} else {
				
				if (orientation == UP) {
					pos_up1 = corner_pos_up;
					pos_down1 = pos1 - u0 * hw * width_factor;
				} else {
					pos_up1 = pos1 + u0 * hw * width_factor;
					pos_down1 = corner_pos_down;
				}
			}
		} else {
			
			if (current_joint_mode == Line2D::LINE_JOINT_SHARP) {
				
				current_joint_mode = Line2D::LINE_JOINT_BEVEL;