After a fixed 12 or 24 hours or so?
Thats a common one if the Pi isnt configured with a manual static IP but instead with one thats acquired automatically via DHCP.
Part of the switch procedure is to disable the routers DHCP service.
So after 12 or 24 hours or so, the current active DHCP lease on the Pi expires (the one from the router) and the Pi loses its IP details resulting in that you cant connect anymore.
And a DHCP server (the Pi) cant supply itself with a unicast IP address.
$ sudo pihole-FTL dhcp-discover
Scanning all your interfaces for DHCP servers
[..]
lease-time: 86400 ( 1d )