### 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 (is_move_caret_on_right_click_enabled()) {
					if (has_selection()) {
						for (int i = 0; i < get_caret_count(); i++) {
							int from_line = get_selection_from_line(i);
							int to_line = get_selection_to_line(i);
							int from_column = get_selection_from_column(i);
							int to_column = get_selection_to_column(i);
							if (row >= from_line && row <= to_line && (row != from_line || col >= from_column) && (row != to_line || col <= to_column)) {
								
								selection_clicked = true;
								break;
							}
						}
					}
					if (!selection_clicked) {
						deselect();
						remove_secondary_carets();
						set_caret_line(row, false, false);
						set_caret_column(col);
					}
					merge_overlapping_carets();
				}
				if (context_menu_enabled) {
					_update_context_menu();
					menu->set_position(get_screen_position() + mpos);
					menu->reset_size();
					menu->popup();
					grab_focus();
				}
			}