### 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 (!caret_index_edit_dirty) {
		return caret_index_edit_order;
	}
	caret_index_edit_order.clear();
	caret_index_edit_order.push_back(0);
	for (int i = 1; i < carets.size(); i++) {
		int j = 0;
		int line = has_selection(i) ? get_selection_to_line(i) : carets[i].line;
		int col = has_selection(i) ? get_selection_to_column(i) : carets[i].column;
		for (; j < caret_index_edit_order.size(); j++) {
			int idx = caret_index_edit_order[j];
			int other_line = has_selection(idx) ? get_selection_to_line(idx) : carets[idx].line;
			int other_col = has_selection(idx) ? get_selection_to_column(idx) : carets[idx].column;
			if (line > other_line || (line == other_line && col > other_col)) {
				break;
			}
		}
		caret_index_edit_order.insert(j, i);
	}
	caret_index_edit_dirty = false;
	return caret_index_edit_order;
}
void TextEdit::adjust_carets_after_edit(int p_caret, int p_from_line, int p_from_col, int p_to_line, int p_to_col) {