### Godot version

c0d8d91

### System information

Windows 11

### Issue description

There's weird bug going on with the latest master branch. The auto completion in script editor is sorted in a wacky ways, putting sort of constants ahead of anything because it's ahead alphabetically
![image](https://github.com/godotengine/godot/assets/13846022/0f3e389e-f5d1-46b2-9f78-c215f3ad5abd)

Now compare it to my build about two weeks ago
![image](https://github.com/godotengine/godot/assets/13846022/37013cad-2e8f-4aa3-9270-0e8dfd9502ea)

Both are using the same content of 'editor_data' settings folder. And loading up the same project.

### Steps to reproduce

- Open a new blank project
- Make a new script
- Triggers any auto completion in Script Editor

### Minimal reproduction project

N/A
if (p_to_line < p_from_line) {
			for (int i = end_line; i > start_line; i--) {
				delimiter_cache.remove_at(i);
			}
		} else {
			for (int i = start_line; i < end_line; i++) {
				delimiter_cache.insert(i, RBMap<int, int>());
			}
		}
	}
	int in_region = -1;
	for (int i = start_line; i < MIN(end_line + 1, line_count); i++) {
		int current_end_region = (i <= 0 || delimiter_cache[i].size() < 1) ? -1 : delimiter_cache[i].back()->value();
		in_region = (i <= 0 || delimiter_cache[i - 1].size() < 1) ? -1 : delimiter_cache[i - 1].back()->value();
		const String &str = get_line(i);
		const int line_length = str.length();
		delimiter_cache.write[i].clear();
		if (str.length() == 0) {
			if (in_region != -1) {
				delimiter_cache.write[i][0] = in_region;
			}
			if (i == end_line && current_end_region != in_region) {
				end_line++;
				end_line = MIN(end_line, line_count);
			}
			continue;
		}
		int end_region = -1;
		for (int j = 0; j < line_length; j++) {
			int from = j;