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

Ref<InputEventKey> k = p_gui_input;
	if (k.is_valid()) {
		if (!k->is_pressed()) {
			if (alt_start && k->get_keycode() == Key::ALT) {
				alt_start = false;
				if ((alt_code > 0x31 && alt_code < 0xd800) || (alt_code > 0xdfff && alt_code <= 0x10ffff)) {
					handle_unicode_input(alt_code);
				}
				return true;
			}
			return false;
		}
		if (k->is_alt_pressed()) {
			if (!alt_start) {
				if (k->get_keycode() == Key::KP_ADD) {
					alt_start = true;
					alt_code = 0;
					return true;
				}
			} else {
				if (k->get_keycode() >= Key::KEY_0 && k->get_keycode() <= Key::KEY_9) {
					alt_code = alt_code << 4;
					alt_code += (uint32_t)(k->get_keycode() - Key::KEY_0);
				}
				if (k->get_keycode() >= Key::KP_0 && k->get_keycode() <= Key::KP_9) {