### 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
const String line = get_line(caret_line);
			int caret_col = get_caret_column(i);
			int matching_chars = code_completion_base.length();
			for (; matching_chars <= insert_text.length(); matching_chars++) {
				if (caret_col >= line.length() || line[caret_col] != insert_text[matching_chars]) {
					break;
				}
				caret_col++;
			}
			
			remove_text(caret_line, get_caret_column(i) - code_completion_base.length(), caret_line, get_caret_column(i));
			adjust_carets_after_edit(i, caret_line, get_caret_column(i) - code_completion_base.length(), caret_line, get_caret_column(i));
			set_caret_column(get_caret_column(i) - code_completion_base.length(), false, i);
			
			insert_text_at_caret(insert_text.substr(0, code_completion_base.length()), i);
			set_caret_column(caret_col, false, i);
			insert_text_at_caret(insert_text.substr(matching_chars), i);
		}
		
		const String line = get_line(caret_line);
		char32_t next_char = line[get_caret_column(i)];
		char32_t last_completion_char = insert_text[insert_text.length() - 1];
		if (i == 0) {
			caret_last_completion_char = last_completion_char;
		}
		char32_t last_completion_char_display = display_text[display_text.length() - 1];
		bool last_char_matches = (last_completion_char == next_char || last_completion_char_display == next_char);
		int pre_brace_pair = get_caret_column(i) > 0 ? _get_auto_brace_pair_open_at_pos(caret_line, get_caret_column(i)) : -1;
		int post_brace_pair = get_caret_column(i) < get_line(caret_line).length() ? _get_auto_brace_pair_close_at_pos(caret_line, get_caret_column(i)) : -1;