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

if (text[p_line].hidden == p_hidden) {
				return;
			}
			text.write[p_line].hidden = p_hidden;
			if (!p_hidden && text[p_line].width > max_width) {
				max_width = text[p_line].width;
			} else if (p_hidden && text[p_line].width == max_width) {
				_calculate_max_line_width();
			}
		}
		bool is_hidden(int p_line) const { return text[p_line].hidden; }
		void insert(int p_at, const Vector<String> &p_text, const Vector<Array> &p_bidi_override);
		void remove_range(int p_from_line, int p_to_line);
		int size() const { return text.size(); }
		void clear();
		void invalidate_cache(int p_line, int p_column = -1, bool p_text_changed = false, const String &p_ime_text = String(), const Array &p_bidi_override = Array());
		void invalidate_font();
		void invalidate_all();
		void invalidate_all_lines();
		_FORCE_INLINE_ const String &operator[](int p_line) const;
		
		void add_gutter(int p_at);
		void remove_gutter(int p_gutter);
		void move_gutters(int p_from_line, int p_to_line);
		void set_line_gutter_metadata(int p_line, int p_gutter, const Variant &p_metadata) { text.write[p_line].gutters.write[p_gutter].metadata = p_metadata; }