What is the meaning of [Better to be a live dog than a dead lion]

The most despicable living man’s state, is preferable to that of the most
noble who have died impenitent. Thus, it is better to be a live coward than a
dead hero.

Origin: To him that is joined to all the living, there is hope: for a living
dog is better than a dead lion. [Ecclesiastes 9:4]

When read in context, what the proverb really teaches is hope, because while
there is life there is hope and a dead person, whatever important and noble he
could have been, cannot change anything.