Skeletons are unable to swim, but they can breath and sink underwater; however, they will use melee attack to attack player, instead of ranged attacking with their bow.[upcoming 1.13]
- The Minecraft Wiki, Skeleton#Attacking_the_player
This statement from the Minecraft Wiki is not true, which you will find if you place a skeleton in deep water and go into survival mode. They will shoot you. This may not sound like an issue at first, but really it is, due to the differences in how arrows travel in water. At a long enough distance, the arrows will never hit the player, instead just sinking to the bottom and potentially hit the skeleton itself (MC-217954). Another issue is that when you swim above them they will try to shoot upwards and the arrows will fall right down into them, killing them. This issue has been around since skeletons gained the ability to walk underwater in 18w19a.
I am unsure if this is intended or not, but I do not believe that it is. While I cannot confirm if it is true, in Bedrock edition 1.5 skeletons will switch to melee attacks in the water, and it would make sense for it to be the same on both versions of the game.
I think this video shows the issue fairly well: https://www.youtube.com/watch?v=dFERcR5363k
[media]
It's normal, a update of a snopshot has made all the undead would sink into the water and undead needn't breathe underwater, but phantoms and withers can still fly(or swim) underwater instead of sink into the water