A const reference guarantees to the caller that the callee won't modify the object, not to the callee that the object won't be modified.
It's to be expect that we can change a-through-&b, but not a-through-&a in foo.
You either need to be very strict about creating non-const references to objects, or you need to enforce immutability at the class level. Unfortunately the latter has all sorts of other practical problems, often including efficiency trade-offs or awkward APIs.
And this is exactly why const means pretty close to nothing. Compilers can't enforce it in so many situations that it is almost like the "auto" keyword in pre-C++11 times.
If you want the compiler to actually enforce safety properties of the language, use a language like Haskell or Rust.