### Godot version

v4.0.rc1.official [8843d9ad3]

### System information

Windows 11 Pro 64Bit

### Issue description

Hi,

Found a rather annoying bug in 4.0 RC1 official on Windows 11:
When right clicking on a function in code and selecting "Lookup Symbol" - it does not always work?
Sometimes it works, sometimes it does not work?

Any ideas?

Jesse

### Steps to reproduce

Right click on a function in code and select "Lookup Symbol".
(it does not work always?)

### Minimal reproduction project

N.A.
const int row_height = get_line_height();
			if (line_length_guideline_columns.size() > 0) {
				const int xmargin_beg = theme_cache.style_normal->get_margin(SIDE_LEFT) + get_total_gutter_width();
				const int xmargin_end = size.width - theme_cache.style_normal->get_margin(SIDE_RIGHT) - (is_drawing_minimap() ? get_minimap_width() : 0);
				const float char_size = theme_cache.font->get_char_size('0', theme_cache.font_size).width;
				for (int i = 0; i < line_length_guideline_columns.size(); i++) {
					const int xoffset = xmargin_beg + char_size * (int)line_length_guideline_columns[i] - get_h_scroll();
					if (xoffset > xmargin_beg && xoffset < xmargin_end) {
						Color guideline_color = (i == 0) ? theme_cache.line_length_guideline_color : theme_cache.line_length_guideline_color * Color(1, 1, 1, 0.5);
						if (rtl) {
							RenderingServer::get_singleton()->canvas_item_add_line(ci, Point2(size.width - xoffset, 0), Point2(size.width - xoffset, size.height), guideline_color);
							continue;
						}
						RenderingServer::get_singleton()->canvas_item_add_line(ci, Point2(xoffset, 0), Point2(xoffset, size.height), guideline_color);
					}
				}
			}
			bool code_completion_below = false;
			if (caret_visible && code_completion_active && code_completion_options.size() > 0) {
				const int code_completion_options_count = code_completion_options.size();
				const int lines = MIN(code_completion_options_count, theme_cache.code_completion_max_lines);
				const Size2 icon_area_size(row_height, row_height);
				code_completion_rect.size.width = code_completion_longest_line + theme_cache.code_completion_icon_separation + icon_area_size.width + 2;
				code_completion_rect.size.height = lines * row_height;
				const Point2 caret_pos = get_caret_draw_pos();
				const int total_height = theme_cache.code_completion_style->get_minimum_size().y + code_completion_rect.size.height;
				const bool can_fit_completion_above = (caret_pos.y - row_height > total_height);
				const bool can_fit_completion_below = (caret_pos.y + row_height + total_height <= get_size().height);
				if (!can_fit_completion_below && can_fit_completion_above) {
					code_completion_rect.position.y = (caret_pos.y - total_height - row_height) + theme_cache.line_spacing;