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

text_editor->remove_secondary_carets();
	bool selection_enabled = text_editor->has_selection(0);
	Point2i selection_begin, selection_end;
	if (selection_enabled) {
		selection_begin = Point2i(text_editor->get_selection_from_line(0), text_editor->get_selection_from_column(0));
		selection_end = Point2i(text_editor->get_selection_to_line(0), text_editor->get_selection_to_column(0));
	}
	String repl_text = get_replace_text();
	int search_text_len = get_search_text().length();
	text_editor->begin_complex_operation();
	if (selection_enabled && is_selection_only()) {
		
		text_editor->set_caret_line(selection_begin.width, false, true, 0, 0);
		text_editor->set_caret_column(selection_begin.height, true, 0);
	}
	if (search_current()) {
		text_editor->unfold_line(result_line);
		text_editor->select(result_line, result_col, result_line, result_col + search_text_len, 0);
		if (selection_enabled && is_selection_only()) {
			Point2i match_from(result_line, result_col);
			Point2i match_to(result_line, result_col + search_text_len);
			if (!(match_from < selection_begin || match_to > selection_end)) {
				text_editor->insert_text_at_caret(repl_text, 0);
				if (match_to.x == selection_end.x) {
					
					selection_end.y += repl_text.length() - search_text_len;
				}
			}
		} else {
			text_editor->insert_text_at_caret(repl_text, 0);