### Godot version

Godot 4.0 statble

### System information

Windows 10

### Issue description

TextEdit boundary wrapmode not works, it only removes the horizontal scrollbar

### Steps to reproduce

Add a textedit in editor, set  the wrap mode to boundary, type something.

### Minimal reproduction project

![image](https://user-images.githubusercontent.com/9168814/224538077-2efb4e67-8976-496e-9223-c460365ecc28.png)
![image](https://user-images.githubusercontent.com/9168814/224538084-af773b86-d73a-4e8b-9b66-a0fb4bde1168.png)

if (overtype_mode) {
													ts_caret.t_caret.position.y = TS->shaped_text_get_descent(rid);
													ts_caret.t_caret.size.y = caret_width;
												} else {
													ts_caret.t_caret.position.y = -TS->shaped_text_get_ascent(rid);
													ts_caret.t_caret.size.y = h;
												}
												ts_caret.t_caret.position += Vector2(char_margin + ofs_x, ofs_y);
												draw_rect(ts_caret.t_caret, theme_cache.caret_color, overtype_mode);
												if (ts_caret.l_caret != Rect2() && ts_caret.l_dir != ts_caret.t_dir) {
													
													ts_caret.l_caret.position += Vector2(char_margin + ofs_x, ofs_y);
													ts_caret.l_caret.size.x = caret_width;
													draw_rect(ts_caret.l_caret, theme_cache.caret_color);
													
													float d = (ts_caret.l_dir == TextServer::DIRECTION_LTR) ? 0.5 : -3;
													Rect2 trect = Rect2(ts_caret.l_caret.position.x + d * caret_width, ts_caret.l_caret.position.y + ts_caret.l_caret.size.y - caret_width, 3 * caret_width, caret_width);
													RenderingServer::get_singleton()->canvas_item_add_rect(ci, trect, theme_cache.caret_color);
												}
											} else { 
												if (gl_size > 0) {
													
													if (overtype_mode) {
														ts_caret.l_caret.position.y = TS->shaped_text_get_descent(rid);
														ts_caret.l_caret.size.y = caret_width;
													} else {
														ts_caret.l_caret.position.y = -TS->shaped_text_get_ascent(rid);
														ts_caret.l_caret.size.y = h;
													}
												} else if (overtype_mode) {