The bug
/gamerule _rule_ <value> succeeds even though <value> equals the current value. This behavior is inconsistent with other commands: /bossbar, /team, and /data.
How to reproduce
/gamerule maxCommandChainLength 2/gamerule maxCommandChainLength 2→ ✔
Gamerule maxCommandChainLength is now set to: 2/gamerule maxCommandChainLength 2/gamerule maxCommandChainLength 2→ ❌
Gamerule maxCommandChainLength is now set to: 2
Can confirm.