Power save on the wifi chip. Check it with iw dev wlan0 get power_save and I would bet money it says on.
Turning it off with iw dev wlan0 set power_save off will confirm the diagnosis within an evening, but that does not survive a reboot. Make it stick with a tiny systemd unit that runs the same command after the network is up, or if you are on NetworkManager set wifi.powersave = 2 in a file under /etc/NetworkManager/conf.d/.
The reason it looks like the Pi died is that the chip goes into a deep sleep and then fails to wake for beacons, so the router quietly ages it out of the association table. Nothing on the Pi notices because nothing on the Pi was trying to talk.