The reactor is turned down and rapidly stops producing that much heat. On site backups keep the pumps running to continue cooling the residual heat. There's a long slow tail as lower energy fusion chains tail off towards lead but the vast majority of the power comes down quickly.