### 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.
ERR_FAIL_INDEX_V(p_caret, carets.size(), Point2(0, 0));
	return carets[p_caret].draw_pos;
}
void TextEdit::set_caret_line(int p_line, bool p_adjust_viewport, bool p_can_be_hidden, int p_wrap_index, int p_caret) {
	ERR_FAIL_INDEX(p_caret, carets.size());
	if (setting_caret_line) {
		return;
	}
	setting_caret_line = true;
	if (p_line < 0) {
		p_line = 0;
	}
	if (p_line >= text.size()) {
		p_line = text.size() - 1;
	}
	if (!p_can_be_hidden) {
		if (_is_line_hidden(CLAMP(p_line, 0, text.size() - 1))) {
			int move_down = get_next_visible_line_offset_from(p_line, 1) - 1;
			if (p_line + move_down <= text.size() - 1 && !_is_line_hidden(p_line + move_down)) {
				p_line += move_down;
			} else {
				int move_up = get_next_visible_line_offset_from(p_line, -1) - 1;
				if (p_line - move_up > 0 && !_is_line_hidden(p_line - move_up)) {
					p_line -= move_up;
				} else {
					WARN_PRINT(("Caret set to hidden line " + itos(p_line) + " and there are no nonhidden lines."));
				}