After a while, dolphins die in water (like they are suffocating in air).
I don't know what versions it affects other than 18w15a. It may affect other versions. Also, in the screenshots, them dying is NOT from maxEntityCramming, as I set it to its maximum value (999999999).
The dolphins drown. Dolphins are mammals and need to breathe, that's why they jump out of the water quite frequently. They can survive longer without breating than any other mob in Minecraft, but they still need to breathe.
Based on the implementation in Minecraft (which looks like this is intended) and how real-life dolphins need to breathe, I am closing this report as working as intended.
By the way, dolphins were added in 18w15a, so it cannot affect any other versions, because 18w15a is the only version where dolphins exist. Besides, we only care for the latest snapshot (and the latest release version) anyway.