I really like the idea of Sonic disliking being emerged in water or the prospect of water literally coming after him (like Chaos did); it is a rational motive for not learning how to swim. I also find it to be a fair assessment considering how much water hinders his speed witch he loves so much and how the games goes out of their way to make the underwater experience scary by having the air bubbles be so far apart and using that awful drowning noise (I HATE IT SO MUCH). The other characters like Knuckles and Tails can swim so their chances of drowning is much smaller.
What I also like about this two panels is that is shows Sonic reassuring Amy that everything is fine and right after lets us in on what he is really thinking. I would say it is typical of Sonic to hide most of his own weaknesses; he has a strong sense of identity and a phobia of mundane entities is not part of that identity. So he only thinks about it, leaving his identity unharmed.
I do not think it clashes with the games characterization at all since we rarely gets to hear Sonic’s thoughts in the games, making it a distinct possibility that he has thought about this once or twice without the player knowing about it. It also adds an internal conflict for him to struggle with and struggle is where character growth is found.