I work for a funeral establishment as a Pre-Need counselor -- in other words, I sell funeral plans before they are needed as many people like to plan so their children don't have to do it.
We recently had a funeral for a man who died on a cruise ship. The ship docked in Naples and he and his wife were taken off. She had to make the arrangements to fly home and separate arrangements for the deceased as they had to get an Italian death certificate.
Please take travel insurance that covers the cost of transporting the body. I know it adds to the cost of a trip, but I had to use it myself once - not for a death but because my significant other had to have surgery.
The only piece of good news for this type of sad occasion is that flying a body home, even on an international flight is less than buying a ticket for a living passenger.
There is also a separate type of insurance which my establishment does not have, that is relatively inexpensive -- about $175 -- and will fly your body home if you die more than 75 miles from your place of residence.