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

const int old_width = text.write[p_line].width;
	int line_width = get_line_width(p_line);
	text.write[p_line].width = line_width;
	
	if (old_width == max_width && line_width < max_width) {
		_calculate_max_line_width();
	} else if (!is_hidden(p_line)) {
		max_width = MAX(line_width, max_width);
	}
}
void TextEdit::Text::invalidate_all_lines() {
	for (int i = 0; i < text.size(); i++) {
		text.write[i].data_buf->set_width(width);
		if (tab_size_dirty) {
			if (tab_size > 0) {
				Vector<float> tabs;
				tabs.push_back(font->get_char_size(' ', font_size).width * tab_size);
				text.write[i].data_buf->tab_align(tabs);
			}
			
			text.write[i].width = get_line_width(i);
		}
	}
	if (tab_size_dirty) {
		_calculate_max_line_width();
		tab_size_dirty = false;
	}
}
void TextEdit::Text::invalidate_font() {