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

theme_cache.outline_size = get_theme_constant(SNAME("outline_size"));
	theme_cache.outline_color = get_theme_color(SNAME("font_outline_color"));
	theme_cache.line_spacing = get_theme_constant(SNAME("line_spacing"));
	if (text.get_line_height() + theme_cache.line_spacing < 1) {
		WARN_PRINT("Line height is too small, please increase font_size and/or line_spacing");
	}
	theme_cache.background_color = get_theme_color(SNAME("background_color"));
	theme_cache.current_line_color = get_theme_color(SNAME("current_line_color"));
	theme_cache.word_highlighted_color = get_theme_color(SNAME("word_highlighted_color"));
}
void TextEdit::_update_caches() {
	
	TextServer::Direction dir;
	if (text_direction == Control::TEXT_DIRECTION_INHERITED) {
		dir = is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR;
	} else {
		dir = (TextServer::Direction)text_direction;
	}
	text.set_direction_and_language(dir, (!language.is_empty()) ? language : TranslationServer::get_singleton()->get_tool_locale());
	text.set_draw_control_chars(draw_control_chars);
	text.set_font(theme_cache.font);
	text.set_font_size(theme_cache.font_size);
	text.invalidate_font();
	_update_placeholder();
	
	if (syntax_highlighter.is_valid()) {
		syntax_highlighter->set_text_edit(this);
	}
}
Size2 TextEdit::get_minimum_size() const {