### 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.
from_selections.write[c].first = get_selection_from_line(c);
		from_selections.write[c].second = get_selection_from_column(c);
		to_selections.write[c].first = get_selection_to_line(c);
		to_selections.write[c].second = get_selection_to_column(c);
	}
	
	const char32_t from_indent_char = indent_using_spaces ? '\t' : ' ';
	int size_diff = indent_using_spaces ? indent_size - 1 : -(indent_size - 1);
	bool changed_indentation = false;
	for (int i = p_from_line; i <= p_to_line; i++) {
		String line = get_line(i);
		if (line.length() <= 0) {
			continue;
		}
		
		int j = 0;
		int space_count = 0;
		bool line_changed = false;
		while (j < line.length() && (line[j] == ' ' || line[j] == '\t')) {
			if (line[j] != from_indent_char) {
				space_count = 0;
				j++;
				continue;
			}
			space_count++;
			if (!indent_using_spaces && space_count != indent_size) {
				j++;
				continue;
			}
			line_changed = true;