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

emit_signal(SNAME("load_theme_settings"));
	error->begin_bulk_theme_override();
	error->add_theme_font_override(SNAME("font"), get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
	error->add_theme_font_size_override(SNAME("font_size"), get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
	error->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("error_color"), SNAME("Editor")));
	Ref<Font> status_bar_font = get_theme_font(SNAME("status_source"), SNAME("EditorFonts"));
	int status_bar_font_size = get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts"));
	error->add_theme_font_override("font", status_bar_font);
	error->add_theme_font_size_override("font_size", status_bar_font_size);
	int count = status_bar->get_child_count();
	for (int i = 0; i < count; i++) {
		Control *n = Object::cast_to<Control>(status_bar->get_child(i));
		if (n) {
			n->add_theme_font_override("font", status_bar_font);
			n->add_theme_font_size_override("font_size", status_bar_font_size);
		}
	}
	error->end_bulk_theme_override();
}
void CodeTextEditor::_on_settings_change() {
	_apply_settings_change();
}
void CodeTextEditor::_apply_settings_change() {
	_update_text_editor_theme();
	font_size = EDITOR_GET("interface/editor/code_font_size");
	int ot_mode = EDITOR_GET("interface/editor/code_font_contextual_ligatures");
	Ref<FontVariation> fc = text_editor->get_theme_font(SNAME("font"));
	if (fc.is_valid()) {
		switch (ot_mode) {