The panda could've possibly died by glitching into the walls while on the boat. It's pretty common for boats to suffocate entities when in cramped rooms.
Another thing that makes me believe that the panda suffocated to death is the fact that a piece of bamboo was left behind; when pandas die they can sometimes drop bamboo, when a zombie spawns in there is a chance that it's a zombie that can pick up items left on the floor, and if the zombie ends up pathfinding with the boat nearby it could board the boat.
Basically what I think happened here is that; the panda on the boat suffocated into the walls of its cramped hole, the dead panda dropped bamboo and left the boat vacant, a zombie which could pick up items spawned inside this 2x2x2 hole and picked up the bamboo, and the zombie ended up walking towards and boarded the boat.