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

Control::_update_theme_item_cache();
	theme_cache.base_scale = get_theme_default_base_scale();
	
	theme_cache.brace_mismatch_color = get_theme_color(SNAME("brace_mismatch_color"), SNAME("CodeEdit"));
	theme_cache.code_folding_color = get_theme_color(SNAME("code_folding_color"), SNAME("CodeEdit"));
	theme_cache.folded_eol_icon = get_theme_icon(SNAME("folded_eol_icon"), SNAME("CodeEdit"));
	
	theme_cache.search_result_color = get_theme_color(SNAME("search_result_color"));
	theme_cache.search_result_border_color = get_theme_color(SNAME("search_result_border_color"));
	
	theme_cache.caret_width = get_theme_constant(SNAME("caret_width"));
	theme_cache.caret_color = get_theme_color(SNAME("caret_color"));
	theme_cache.caret_background_color = get_theme_color(SNAME("caret_background_color"));
	
	theme_cache.font_selected_color = get_theme_color(SNAME("font_selected_color"));
	theme_cache.selection_color = get_theme_color(SNAME("selection_color"));
	use_selected_font_color = theme_cache.font_selected_color != Color(0, 0, 0, 0);
	
	theme_cache.style_normal = get_theme_stylebox(SNAME("normal"));
	theme_cache.style_focus = get_theme_stylebox(SNAME("focus"));
	theme_cache.style_readonly = get_theme_stylebox(SNAME("read_only"));
	theme_cache.tab_icon = get_theme_icon(SNAME("tab"));
	theme_cache.space_icon = get_theme_icon(SNAME("space"));
	theme_cache.font = get_theme_font(SNAME("font"));
	theme_cache.font_size = get_theme_font_size(SNAME("font_size"));
	theme_cache.font_color = get_theme_color(SNAME("font_color"));
	theme_cache.font_readonly_color = get_theme_color(SNAME("font_readonly_color"));
	theme_cache.font_placeholder_color = get_theme_color(SNAME("font_placeholder_color"));