### 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.
String code = code_editor->get_text_editor()->get_text();
	int pos = script->get_language()->find_function(p_function, code);
	code_editor->get_text_editor()->remove_secondary_carets();
	if (pos == -1) {
		
		code_editor->get_text_editor()->deselect();
		pos = code_editor->get_text_editor()->get_line_count() + 2;
		String func = script->get_language()->make_function("", p_function, p_args);
		
		code_editor->get_text_editor()->set_caret_line(pos + 1);
		code_editor->get_text_editor()->set_caret_column(1000000); 
		code_editor->get_text_editor()->insert_text_at_caret("\n\n" + func);
	}
	code_editor->get_text_editor()->set_caret_line(pos);
	code_editor->get_text_editor()->set_caret_column(1);
}
bool ScriptTextEditor::show_members_overview() {
	return true;
}
void ScriptTextEditor::update_settings() {