White phosphorus burns when exposed to water that’s what makes it such a fun military tool.
It doesn't burn when exposed, it's just that if burning, water won't extinguish it.
Phosophorus burns when exposed to air. Water puts it out. Sodium burns when it touches water.