Not actually correct in this case. Hypoxia is only painless if oxygen is displaced with an inert gas like nitrogen. Our bodies detect low oxygen indirectly via chemoreceptors that detect the increase in blood acidity (respiratory acidosis) induced by high carbon dioxide (hypercapnia).
As humans breathe in a sealed environment, oxygen is replaced with CO2. Hypercapnia is what causes the panic and pain of drowning prior to inhalation of water. Consciousness is lost mere seconds after water inhalation.
Drowning and hypercapnic asphyxiation are essentially the same experience in terms of suffering.
Secondary outcomes and resuscitation are a different story, but are obviously not applicable here.