### 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 (rtl) {
										gutter_rect.position.x = size.width - gutter_rect.position.x - gutter_rect.size.x;
									}
									icon->draw_rect(ci, gutter_rect, false, get_line_gutter_item_color(line, g));
								} break;
								case GUTTER_TYPE_CUSTOM: {
									if (gutter.custom_draw_callback.is_valid()) {
										Rect2i gutter_rect = Rect2i(Point2i(gutter_offset, ofs_y), Size2i(gutter.width, row_height));
										if (rtl) {
											gutter_rect.position.x = size.width - gutter_rect.position.x - gutter_rect.size.x;
										}
										Variant args[3] = { line, g, Rect2(gutter_rect) };
										const Variant *argp[] = { &args[0], &args[1], &args[2] };
										Callable::CallError ce;
										Variant ret;
										gutter.custom_draw_callback.callp(argp, 3, ret, ce);
									}
								} break;
							}
							gutter_offset += gutter.width;
						}
					}
					
					RID rid = ldata->get_line_rid(line_wrap_index);
					float text_height = TS->shaped_text_get_size(rid).y;
					if (rtl) {
						char_margin = size.width - char_margin - TS->shaped_text_get_size(rid).x;
					}
					for (int c = 0; c < carets.size(); c++) {
						if (!clipped && has_selection(c) && line >= get_selection_from_line(c) && line <= get_selection_to_line(c)) {