### Godot version

4.0 beta17

### System information

Windows10

### Issue description

call `"".split()`
Is there an infinite loop inside? Function does not return.

### Steps to reproduce

"".split()

### Minimal reproduction project

N/A
s = s.substr(p + 3);
		}
	}
	if (!found) {
		if (is_network_share_path()) {
			
			drive = s.substr(0, 2);
			s = s.substr(2);
		} else if (s.begins_with("/") || s.begins_with("\\")) {
			
			drive = s.substr(0, 1);
			s = s.substr(1);
		} else {
			
			p = s.find(":/");
			if (p == -1) {
				p = s.find(":\\");
			}
			if (p != -1 && p < s.find("/")) {
				drive = s.substr(0, p + 2);
				s = s.substr(p + 2);
			}
		}
	}
	s = s.replace("\\", "/");
	while (true) { 
		String compare = s.replace("//", "/");
		if (s == compare) {
			break;
		} else {