Hypoxia causes apnea and swallowing, not breathing or gasping. The temperature differential is another factor. When a baby is born into water so close to maternal temperature the baby doesn't detect a change so no breathing is initiated. In some places where an oceanbirth occurs, the water is much cooler than maternal temperature. This is an area for reconsideration since lower temperatures do not seem to stimulate the baby to breathe while immersed either.
Water is a hypotonic solution and lung fluids present in the fetus are hypertonic.
Hypertonic solutions are denser and prevent hypotonic solutions from merging or coming into their presence. Thus, as water passes through the larynx it does not pass into the lungs. The 'mammalian dive or autonomic reflex' built into all newborns is present at birth and mysteriously disappears around 6 to 8 months. This reflex is associated with the taste buds along the larynx. It has been discovered newborns exposed to water training up to 8 months after birth are able to avoid atrophy of the mammalian dive reflex.