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

int col_pos = 0;
		while (true) {
			col_pos = is_case_sensitive() ? line_text.find(searched, col_pos) : line_text.findn(searched, col_pos);
			if (col_pos == -1) {
				break;
			}
			if (is_whole_words()) {
				if (col_pos > 0 && !is_symbol(line_text[col_pos - 1])) {
					col_pos += searched.length();
					continue;
				}
				if (col_pos + searched.length() < line_text.length() && !is_symbol(line_text[col_pos + searched.length()])) {
					col_pos += searched.length();
					continue;
				}
			}
			results_count++;
			if (i == result_line) {
				if (col_pos == result_col) {
					results_count_to_current = results_count;
				} else if (col_pos < result_col && col_pos + searched.length() > result_col) {
					col_pos = result_col;
					results_count_to_current = results_count;
				}
			}
			col_pos += searched.length();
		}
	}
}
void FindReplaceBar::_update_matches_label() {