The error message is not obvious, but basically it means that recording has stalled.
As you say this happens (only?) when overdubbing, that indicates that the problem occurs (only) when the device is asked to play and record simultaneously (duplex).
I think the most likely reason that this might happen, is if the device is being asked to operate at two different sample rates simultaneously.
Check the UMC204HD settings in the Windows Sound Control Panel and look for the sample rate settings. Set them to match the “Project Rate” that you are using in Audacity (usually 44100 - look in the lower left corner of the main Audacity window).