When someone is dying perhaps they send out a certain kind of energy and that’s why the cat was sitting next to them. Kind of how a dog can be trained to detect a person about to have a seizure. Just a theory.
I would not doubt that. My cat once “heard” the bookshelf that was about to fall, and ran away seconds before it did. My other cat acted funny before one of the bigger earthquakes near here as well.
I just felt sorry for the cat. I would love to have a cat beside me in my last hours.