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

uint32_t version = 0;
		bool chain_forward = false;
		bool chain_backward = false;
	};
	bool undo_enabled = true;
	int undo_stack_max_size = 50;
	EditAction current_action = EditAction::ACTION_NONE;
	bool pending_action_end = false;
	bool in_action = false;
	int complex_operation_count = 0;
	bool next_operation_is_complex = false;
	TextOperation current_op;
	List<TextOperation> undo_stack;
	List<TextOperation>::Element *undo_stack_pos = nullptr;
	Timer *idle_detect = nullptr;
	uint32_t version = 0;
	uint32_t saved_version = 0;
	void _push_current_op();
	void _do_text_op(const TextOperation &p_op, bool p_reverse);
	void _clear_redo();
	
	String search_text = "";
	uint32_t search_flags = 0;
	int _get_column_pos_of_word(const String &p_key, const String &p_search, uint32_t p_search_flags, int p_from_column) const;
	
	Callable tooltip_callback;
	
	struct LineDrawingCache {
		int y_offset = 0;
		Vector<int> first_visible_chars;