Yeah, there’s this weird misunderstanding that a heart stopping means “death.” It’s like we’re still stuck in the 19th century, before cardiopulmonary resuscitation. (Though for some reason no one says that when someone stops breathing.) It’s really weird to hear people talk about themselves or others having their heart stopped for a period of time and saying, “For [x amount of time], I was legally dead!” Which is completely the opposite of what “legally dead” means.
But the phrase “legally dead,” at least with regard to heart function, refers to a situation where the heart irreversibly stops working. If his heart briefly stopped beating, he was not “dead” in any sense - certainly not legally, and no doctor would have referred to him as “dead” at any point.
They’re the same, though. A briefly stopped heart isn’t medically considered death either. Previous to the 20th century, when they had no way to resuscitate, sure, but now, no. People, for reasons unknown, still talk about heart stoppage as “death,” but it isn’t, medically speaking (though some bad doctors may fall into that same trap out of non-medical habit, despite knowing better). Both medically and legally, death is a non-reversible thing.
If you stop breathing and require resuscitation, no one talks about you “dying.” This isn’t actually any different, but for some reason the heart has some mystic significance to a lot of people who are stuck in a 19th century, pre-resuscitation mindset. There are definitions of corporeal death that this satisfies in the same way that there are definitions of “bird” that elephants satisfy - i.e. wrong ones.