Personality changes following heart transplantation: The role of cellular memory
Most major heart surgery leads to some personality changes. And that's mainly caused by hundreds (thousands??) of micro-clots that lodge in the brain. Modern heart-lung machines are pretty good but still damage blood cells far too much.
I had a triple bypass. I, myself, can't notice anything different but my wife says that there were definite minor personality changes due to the surgery.