### Godot version

4.0 beta 15

### System information

Windows 10

### Issue description

It happened with both Google IME and MS-IME, and there was no problem until Beta14.
When typing Japanese characters, it is common to select a character from the suggestion window and then start typing the next character before confirming.
In this case, uncommitted characters are forcibly committed, and input of the next character begins.

**↓Beta15**

https://user-images.githubusercontent.com/186786/214753450-b493cca6-2644-4b3d-8cd2-660565cc3547.mp4

**↓Beta14**

https://user-images.githubusercontent.com/186786/214755127-dde819cc-4d63-403a-99b0-09821671f74e.mp4



### Steps to reproduce

It happened with both Google IME and MS-IME in beta15

### Minimal reproduction project

It is project independent and happens in the editor.
if (selecting_enabled && mb->is_shift_pressed() && (get_caret_column(caret) != prev_col || get_caret_line(caret) != prev_line)) {
					if (!has_selection(caret)) {
						carets.write[caret].selection.active = true;
						selecting_mode = SelectionMode::SELECTION_MODE_POINTER;
						carets.write[caret].selection.from_column = prev_col;
						carets.write[caret].selection.from_line = prev_line;
						carets.write[caret].selection.to_column = carets[caret].column;
						carets.write[caret].selection.to_line = carets[caret].line;
						if (carets[caret].selection.from_line > carets[caret].selection.to_line || (carets[caret].selection.from_line == carets[caret].selection.to_line && carets[caret].selection.from_column > carets[caret].selection.to_column)) {
							SWAP(carets.write[caret].selection.from_column, carets.write[caret].selection.to_column);
							SWAP(carets.write[caret].selection.from_line, carets.write[caret].selection.to_line);
							carets.write[caret].selection.shiftclick_left = false;
						} else {
							carets.write[caret].selection.shiftclick_left = true;
						}
						carets.write[caret].selection.selecting_line = prev_line;
						carets.write[caret].selection.selecting_column = prev_col;
						caret_index_edit_dirty = true;
						merge_overlapping_carets();
						queue_redraw();
					} else {
						if (carets[caret].line < carets[caret].selection.selecting_line || (carets[caret].line == carets[caret].selection.selecting_line && carets[caret].column < carets[caret].selection.selecting_column)) {
							if (carets[caret].selection.shiftclick_left) {
								carets.write[caret].selection.shiftclick_left = !carets[caret].selection.shiftclick_left;
							}
							carets.write[caret].selection.from_column = carets[caret].column;
							carets.write[caret].selection.from_line = carets[caret].line;
						} else if (carets[caret].line > carets[caret].selection.selecting_line || (carets[caret].line == carets[caret].selection.selecting_line && carets[caret].column > carets[caret].selection.selecting_column)) {
							if (!carets[caret].selection.shiftclick_left) {
								SWAP(carets.write[caret].selection.from_column, carets.write[caret].selection.to_column);