When you delete an index from the array, all the remaining rows move up. So if, for example, the "For each" loop has removed row #3, there is now a different row #3. And if the value in it also happens to be empty, it will not be deleted.
This is why I run the loop in reverse when I need to delete records from arrays.
For "n" from Array.width-1 to 0
Array compare value at loopindex="" -> Array delete index loopindex