### 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)

RenderingServer::get_singleton()->canvas_item_add_rect(ci, trect, theme_cache.caret_color);
											}
											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);
											ts_caret.t_caret.position += Vector2(char_margin + ofs_x, ofs_y);
											ts_caret.t_caret.size.x = caret_width;
											draw_rect(ts_caret.t_caret, theme_cache.caret_color);
										}
									}
								}
							}
							if (!ime_text.is_empty()) {
								{
									
									Vector<Vector2> sel = TS->shaped_text_get_selection(rid, get_caret_column(c), get_caret_column(c) + ime_text.length());
									for (int j = 0; j < sel.size(); j++) {
										Rect2 rect = Rect2(sel[j].x + char_margin + ofs_x, ofs_y, sel[j].y - sel[j].x, text_height);
										if (rect.position.x + rect.size.x <= xmargin_beg || rect.position.x > xmargin_end) {
											continue;
										}
										if (rect.position.x < xmargin_beg) {
											rect.size.x -= (xmargin_beg - rect.position.x);
											rect.position.x = xmargin_beg;
										} else if (rect.position.x + rect.size.x > xmargin_end) {
											rect.size.x = xmargin_end - rect.position.x;
										}
										rect.size.y = caret_width;
										draw_rect(rect, theme_cache.caret_color);
										carets.write[c].draw_pos.x = rect.position.x;