You can breathe underwater when doing animations.

https://youtu.be/7M9gatsyIPs

Simply get in the water, dive underwater, do ANY animation, and your breath will come back while you are under water.

The video above shows me doing it with 3 different animations, but I'd imagine it affects all of them.
This might be a SA-MP bug and not associated with the script I think
I can't 'fix' this but I will disable animations while swimming/underwater.