In the example you provide, the accounting of the transaction does not match the true deposit. This would qualify as an error. The overdrawn issue results from that error. Reg. E makes no distinction on who causes an error, just that an error has occurred.
I also agree with John. The ATM would not have balanced and the error, along with related fees, corrected at that time.
_________________________
My opinions do not necessarily reflect those of all the voices in my head.