So not sure of this specific setup, but for most auvs there are hipap integrated acoustical modems with limited transmit / receive rates, for critical status messages and a control link. Everything else is held on hdd until it surfaces.
https://www.kongsberg.com/maritime/products/Acoustics-Positi...
In the event of a comm disconnect, it probably has a limited amount of instructions to continue carrying out (like surveying to the end of the current grid line) and then holding for a limited amount of time before aborting to the surface. If a connection can be re-established, it continues. It's also possible to have navigation connectivity without 2 way comms, so there are different abort scenarios possible.
If it aborts to surface, then you've got amplified wifi, sat phone, and even an eprb type beacon.