Your vector is a vector of living. Not a vector of pointers.
So when each object is copied into the vector, they are "sliced". In effect, they are cut down to just being objects of type living. Looks up "object slicing" for the full details.
If you made it a vector of pointers, it would work as you expect.
I remember this being a bit confusing back when I was first introduced to it. What's happening in your first example is something called object slicing. You can search the term if you'd like.
Polymorphism only works on pointers and references. When you declare an std::vector<living> and push_back an element, that element is being copied into a value, not a reference.
When a subclass gets assigned or copied to a base class, there is no place for the base class to hold the subclass's information. It is simply not copied, or you can think of it as being stripped out.
You either have to make a vector of pointers, or you can use an std::reference_wrapper.