I was playing Minecraft on the Nintendo Switch.
I went underwater, and made an underground base in Creative Mode. The base had no water in it except for a pool I had made.
I put a wall on the edge of the pool and made it out of light blue glass.
The wall reached the roof, and the pool was accessible by a door which was the only way in and out.
The pool was about 3 or 4 blocks deep in the middle and one block less deep along the edges next to the wall. The pool had Seagrass and Kelp in it along with Salmon and Cod.
I put a Dolphin it there, named it with a name tag and put some unnamed Dolphins in with it.
I switched my game mode to Survival and left the base, but when I came back a few days later, the Dolphins were gone - including the one I had named.
There was no way for the Dolphin to die of suffocation or to drown, and passive mods stay in the world without even having to be named.
It was impossible for the Dolphin to escape as well, because I was able to see it in the ocean above my base.
In the ocean I can still see the Dolphin I have named a week ago, and that one has not vanished.