### 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 String &line = get_line(p_line);
	
	for (int i = 0; i < auto_brace_completion_pairs.size(); i++) {
		const String &open_key = auto_brace_completion_pairs[i].open_key;
		if (p_col - open_key.length() < 0) {
			continue;
		}
		bool is_match = true;
		for (int j = 0; j < open_key.length(); j++) {
			if (line[(p_col - 1) - j] != open_key[(open_key.length() - 1) - j]) {
				is_match = false;
				break;
			}
		}
		if (is_match) {
			return i;
		}
	}
	return -1;
}
int CodeEdit::_get_auto_brace_pair_close_at_pos(int p_line, int p_col) {