### Godot version

4.0 beta 10

### System information

Windows 11

### Issue description

On the text editor when using autocomplete on function arguments that receive Input Map names after autocompleting the function name, the string autocompleted appears with an extra " at the end.
This doesnt happen if you write " and then accept the Input name in the dropdown

### Steps to reproduce

- On the script editor
- Start writing `Input.get_vector` but when the dropdown appears with the autocomplete suggestion for `Input.get_vector` press enter to accept it, then press enter again to accept the Input map suggestion
- The autocompleted input name should have an extra "

### Minimal reproduction project

N/A
if (!is_editable()) {
		return;
	}
	if (has_selection(p_caret)) {
		delete_selection(p_caret);
		return;
	}
	begin_complex_operation();
	Vector<int> caret_edit_order = get_caret_index_edit_order();
	for (const int &i : caret_edit_order) {
		if (p_caret != -1 && p_caret != i) {
			continue;
		}
		int cc = get_caret_column(i);
		int cl = get_caret_line(i);
		if (cc == 0 && cl == 0) {
			continue;
		}
		if (cl > 0 && _is_line_hidden(cl - 1)) {
			unfold_line(get_caret_line(i) - 1);
		}
		int prev_line = cc ? cl : cl - 1;
		int prev_column = cc ? (cc - 1) : (get_line(cl - 1).length());
		merge_gutters(prev_line, cl);
		if (auto_brace_completion_enabled && cc > 0) {
			int idx = _get_auto_brace_pair_open_at_pos(cl, cc);