### Godot version

4.0 stable

### System information

Manjaro Linux, kernel 6.1.1-1-MANJARO, AMD Ryzen 5 3600, AMD RX 580

### Issue description

The `wrap_mode` property of the `TextEdit` node doesn't seem to really do anything. Setting it to `LINE_WRAPPING_BOUNDARY` simply means that there won't be an horizontal scrollbar if the text overshoots the boundary, instead of actually forcing the text to the next line so that it stays visible.

### Steps to reproduce

Create a TextEdit node and set its `wrap_mode` property to `LINE_WRAPPING_BOUNDARY`

### Minimal reproduction project

[WrapBugDemo.zip](https://github.com/godotengine/godot/files/10875969/WrapBugDemo.zip)

return multi_carets_enabled;
}
int TextEdit::add_caret(int p_line, int p_col) {
	if (!multi_carets_enabled) {
		return -1;
	}
	p_line = CLAMP(p_line, 0, text.size() - 1);
	p_col = CLAMP(p_col, 0, get_line(p_line).length());
	for (int i = 0; i < carets.size(); i++) {
		if (get_caret_line(i) == p_line && get_caret_column(i) == p_col) {
			return -1;
		}
		if (has_selection(i)) {
			if (p_line >= get_selection_from_line(i) && p_line <= get_selection_to_line(i) && (p_line > get_selection_from_line(i) || p_col >= get_selection_from_column(i)) && (p_line < get_selection_to_line(i) || p_col <= get_selection_to_column(i))) {
				return -1;
			}
		}
	}
	carets.push_back(Caret());
	set_caret_line(p_line, false, false, 0, carets.size() - 1);
	set_caret_column(p_col, false, carets.size() - 1);
	caret_index_edit_dirty = true;
	return carets.size() - 1;
}
void TextEdit::remove_caret(int p_caret) {