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

void _scroll_up(real_t p_delta);
	void _scroll_down(real_t p_delta);
	void _scroll_lines_up();
	void _scroll_lines_down();
	
	bool draw_minimap = false;
	int minimap_width = 80;
	Point2 minimap_char_size = Point2(1, 2);
	int minimap_line_spacing = 1;
	
	bool minimap_clicked = false;
	bool hovering_minimap = false;
	bool dragging_minimap = false;
	bool can_drag_minimap = false;
	double minimap_scroll_ratio = 0.0;
	double minimap_scroll_click_pos = 0.0;
	void _update_minimap_hover();
	void _update_minimap_click();
	void _update_minimap_drag();
	
	Vector<GutterInfo> gutters;
	int gutters_width = 0;
	int gutter_padding = 0;
	Vector2i hovered_gutter = Vector2i(-1, -1); 
	void _update_gutter_width();
	
	Ref<SyntaxHighlighter> syntax_highlighter;
	Dictionary _get_line_syntax_highlighting(int p_line);
	
	struct ThemeCache {