The DS1339A requires some power to run, it does not have inbuilt battery.
Either VCC or VBAT has to power the IC in order to retain the data when either of the source are disconnected.
DS1339A
Production
The DS1339A serial real-time clock (RTC) is a low-power clock/date device with two programmable time-of-day alarms and a programmable square-wave output...
Datasheet
DS1339A on Analog.com
The DS1339A requires some power to run, it does not have inbuilt battery.
Either VCC or VBAT has to power the IC in order to retain the data when either of the source are disconnected.