Pig brains have been extracted 4 hours after death and kept alive
https://www.nature.com/articles/d41586-019-01216-4
>It could be, Parnia says, that some people who have conventionally been thought to be beyond the point of saving could in fact be revived. “The traditional thinking among doctors is that the brain, once deprived of oxygen for five to 10 minutes, dies,” he says. “We were able to show that the brain is quite robust in terms of its ability to resist oxygen deprivation for prolonged periods of time, which opens up new pathways for finding treatments for brain damage in the future.”
https://scienceandculture.com/2024/07/pig-brains-thought-dead-may-be-revived/
Theoretically you could scoop a brain out and attach it to tissue cultured mechanoreceptors and torture it for eternity with todays tech after a little refinement