DIAGNOSIS The battery is likely degrading and reporting an incorrect charge level. It thinks it's almost dead when it's not, so it aborts the job to seek the charger.
FIX First, run a battery calibration. Let the robot charge on the dock uninterrupted until the app says 100%. Then, start a full cleaning run and let it run until it truly dies and can't return to the dock. Manually place it back on the charger and let it charge to 100% again without interruption. This recalibrates the battery meter.
IF THAT DIDN'T WORK Check for firmware updates in the Roborock app. Sometimes a buggy update can cause early return behavior, and a newer update might fix it.
HEADS UP If the robot is over two years old and this keeps happening even after calibration, the lithium battery itself is probably wearing out and may need replacement—it's a common consumable part.