Pi-hole queries / client activity graph not working correctly

Your Pi-hole is reporting about a day's difference, so I guess your system is already using a file-based time-keeping approach, lest I'd expect the system time would jump from 1970 to current in the absence of any time information at boot.

To avoid potential conflicts, you may want to verify if Ubuntu wouldn't already employ systemd-timesyncd's /var/lib/systemd/timesync/clock for the same purpose. On more recent releases, that may be further controllable via SaveIntervalSec.
If that option would not be available on your system, fake-hwclock would be the superior approach. At least on RPiOS, fake-hwclock would be storing time every hour and on controlled shutdowns.

Still, note that installing fake-hwclock would not be able to mitigate timing issues completely, see also Internet not working on Pihole DNS - #4 by Bucking_Horn.

You may consider fitting an RTC to your RPi - a DS3231 is quite reliable for its low price tag of a few bucks only.