### 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
int match_offset = font->get_string_size(code_completion_options[l].display.substr(0, match.first), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).width;
						int match_len = font->get_string_size(code_completion_options[l].display.substr(match.first, match.second), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).width;
						draw_rect(Rect2(match_pos + Point2(match_offset, 0), Size2(match_len, row_height)), code_completion_existing_color);
					}
					tl->draw(ci, title_pos, code_completion_options[l].font_color);
				}
				
				if (scroll_width) {
					Color scroll_color = is_code_completion_scroll_hovered || is_code_completion_scroll_pressed ? code_completion_scroll_hovered_color : code_completion_scroll_color;
					float r = (float)code_completion_max_lines / code_completion_options_count;
					float o = (float)code_completion_line_ofs / code_completion_options_count;
					draw_rect(Rect2(code_completion_rect.position.x + code_completion_rect.size.width, code_completion_rect.position.y + o * code_completion_rect.size.y, scroll_width, code_completion_rect.size.y * r), scroll_color);
				}
			}
			
			if (caret_visible && !code_hint.is_empty() && (!code_completion_active || (code_completion_below != code_hint_draw_below))) {
				const int font_height = font->get_height(font_size);
				Ref<StyleBox> sb = get_theme_stylebox(SNAME("panel"), SNAME("TooltipPanel"));
				Color color = get_theme_color(SNAME("font_color"), SNAME("TooltipLabel"));
				Vector<String> code_hint_lines = code_hint.split("\n");
				int line_count = code_hint_lines.size();
				int max_width = 0;
				for (int i = 0; i < line_count; i++) {
					max_width = MAX(max_width, font->get_string_size(code_hint_lines[i], HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x);
				}
				Size2 minsize = sb->get_minimum_size() + Size2(max_width, line_count * font_height + (line_spacing * line_count - 1));
				int offset = font->get_string_size(code_hint_lines[0].substr(0, code_hint_lines[0].find(String::chr(0xFFFF))), HORIZONTAL_ALIGNMENT_LEFT, -1, font_size).x;
				if (code_hint_xpos == -0xFFFF) {
					code_hint_xpos = get_caret_draw_pos().x - offset;
				}