### 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 _delete(bool p_word = false, bool p_all_to_right = false);
	void _move_caret_document_start(bool p_select);
	void _move_caret_document_end(bool p_select);
	bool _clear_carets_and_selection();
	
	void _get_above_below_caret_line_column(int p_old_line, int p_old_wrap_index, int p_old_column, bool p_below, int &p_new_line, int &p_new_column, int p_last_fit_x = -1) const;
protected:
	void _notification(int p_what);
	static void _bind_methods();
	virtual void _update_theme_item_cache() override;
	
	
	struct BraceMatchingData {
		int open_match_line = -1;
		int open_match_column = -1;
		bool open_matching = false;
		bool open_mismatch = false;
		int close_match_line = -1;
		int close_match_column = -1;
		bool close_matching = false;
		bool close_mismatch = false;
	};
	bool highlight_matching_braces_enabled = false;
	
	bool hiding_enabled = false;
	void _set_hiding_enabled(bool p_enabled);
	bool _is_hiding_enabled() const;
	void _set_line_as_hidden(int p_line, bool p_hidden);
	bool _is_line_hidden(int p_line) const;
	void _unhide_all_lines();