Minecraft 1.12.2, Minecraft 18w08a, Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w10a, Minecraft 18w10b, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w14a, Minecraft 18w14b, Minecraft 18w15a, Minecraft 18w19b
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.