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

if (!text_editor->has_selection(p_caret)) {
		return text_editor->get_caret_line(p_caret);
	}
	int line = text_editor->get_selection_to_line(p_caret);
	
	if (text_editor->get_selection_to_column(p_caret) == 0) {
		line--;
	}
	return line;
}
void CodeTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
	Ref<InputEventMouseButton> mb = p_event;
	if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
		goto_error();
	}
}
void CodeTextEditor::_update_status_bar_theme() {
	error_button->set_icon(get_theme_icon(SNAME("StatusError"), SNAME("EditorIcons")));
	error_button->add_theme_color_override("font_color", get_theme_color(SNAME("error_color"), SNAME("Editor")));
	error_button->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
	error_button->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
	warning_button->set_icon(get_theme_icon(SNAME("NodeWarning"), SNAME("EditorIcons")));
	warning_button->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
	warning_button->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
	warning_button->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
	line_and_col_txt->add_theme_font_override("font", get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
	line_and_col_txt->add_theme_font_size_override("font_size", get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
}
void CodeTextEditor::_notification(int p_what) {