Let me be more specific...
In Super Mario Sunshine, Yoshi can withstand water as long as it isn't a large amount, such as the water from Mario's FLUDD and fountains.
If there was a big body of water, such as lakes, rivers, and swimming pools, then Yoshi would be unable to go in it without disappearing.
It wasn't fair.