Reproduce:
Summon a squid
Run command
/attribute @n[type=squid] minecraft:movement_speed base set 0
Squid can still swim
Related issues
relates to
Comments

@unknown It does not appear to be swimming in general, as fish do respect this attribute as an example.

Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Swimming speed of entities is not controlled by (that) attribute(s), just like moving while in the air. That attribute only controls walking speed. (The attribute is actually misnamed.)