This relates to
MC-75279, however that one was fixed in a previous update.
A similar issue is happening when sprinting & "flying" in creative mode underwater.
The cape is doing its usual animation, which doesn't really fit the environment.
See this comment by Bemoty for a summary of what causes this while flying.
To fix this, the cape renderer would have to make a difference for when the player is in the swimming animation and change the f2 value to keep the cape down to the player's body.