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

alt_code = alt_code << 4;
					alt_code += (uint32_t)(k->get_keycode() - Key::KP_0);
				}
				if (k->get_keycode() >= Key::A && k->get_keycode() <= Key::F) {
					alt_code = alt_code << 4;
					alt_code += (uint32_t)(k->get_keycode() - Key::A) + 10;
				}
				return true;
			}
		}
	}
	return false;
}
void TextEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
	ERR_FAIL_COND(p_gui_input.is_null());
	double prev_v_scroll = v_scroll->get_value();
	double prev_h_scroll = h_scroll->get_value();
	Ref<InputEventMouseButton> mb = p_gui_input;
	if (mb.is_valid()) {
		Vector2i mpos = mb->get_position();
		if (is_layout_rtl()) {
			mpos.x = get_size().x - mpos.x;
		}
		if (ime_text.length() != 0) {
			
			return;
		}
		if (mb->is_pressed()) {
			if (mb->get_button_index() == MouseButton::WHEEL_UP && !mb->is_command_or_control_pressed()) {
				if (mb->is_shift_pressed()) {