### 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.
int gl_size = TS->shaped_text_get_glyph_count(rid);
					ofs_y += ldata->get_line_ascent(line_wrap_index);
					int first_visible_char = TS->shaped_text_get_range(rid).y;
					int last_visible_char = TS->shaped_text_get_range(rid).x;
					float char_ofs = 0;
					if (outline_size > 0 && outline_color.a > 0) {
						for (int j = 0; j < gl_size; j++) {
							for (int k = 0; k < glyphs[j].repeat; k++) {
								if ((char_ofs + char_margin) >= xmargin_beg && (char_ofs + glyphs[j].advance + char_margin) <= xmargin_end) {
									if (glyphs[j].font_rid != RID()) {
										TS->font_draw_glyph_outline(glyphs[j].font_rid, ci, glyphs[j].font_size, outline_size, Vector2(char_margin + char_ofs + ofs_x + glyphs[j].x_off, ofs_y + glyphs[j].y_off), glyphs[j].index, outline_color);
									}
								}
								char_ofs += glyphs[j].advance;
							}
							if ((char_ofs + char_margin) >= xmargin_end) {
								break;
							}
						}
						char_ofs = 0;
					}
					for (int j = 0; j < gl_size; j++) {
						int64_t color_start = -1;
						for (const Variant *key = color_map.next(nullptr); key; key = color_map.next(key)) {
							if (int64_t(*key) <= glyphs[j].start) {
								color_start = *key;
							} else {
								break;
							}
						}