That is a library design issue.
You can certainly design a vector that is immutable by default and can only allow you to get references when immutable and push_back when mutable.
That is the point of C++, things other languages do at a language level you can easily design as a library without paying a cost if you do not use it.