### Godot version

4.1 dev3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Trying to move a folder results in moving error and it's not moved.
Regression from #75330

A fix already exists, but I'm opening an issue so it's not lost (the PR isn't ready and not very active).

### Steps to reproduce

1. Add 2 folders in filesystem
2. Move one folder into another one

### Minimal reproduction project

N/A
}
	}
	Vector<String> new_paths;
	new_paths.resize(to_move.size());
	for (int i = 0; i < to_move.size(); i++) {
		if (p_overwrite == OVERWRITE_RENAME) {
			new_paths.write[i] = _get_unique_name(to_move[i], p_to_path);
		} else {
			new_paths.write[i] = p_to_path.path_join(to_move[i].path.get_file());
		}
	}
	if (p_copy) {
		bool is_copied = false;
		for (int i = 0; i < to_move.size(); i++) {
			String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path;
			const String &new_path = new_paths[i];
			if (old_path != new_path) {
				_try_duplicate_item(to_move[i], new_paths[i]);
				is_copied = true;
			}
		}
		if (is_copied) {
			_rescan();
		}
	} else {
		
		for (int i = 0; i < to_move.size(); i++) {
			if (to_move[i].is_file && EditorFileSystem::get_singleton()->is_group_file(to_move[i].path)) {
				EditorFileSystem::get_singleton()->move_group_file(to_move[i].path, new_paths[i]);
			}