The short answer is yes. However, they don’t do that because they ‘want’ to live longer inside patients. Viruses have no free will. Rather, the process is called survival of the fittest – the backbone of classical evolution theory.
It was already well-known when I was a medical student, almost half a century ago, that over time, viral and bacterial infections become less vicious to a population. And the mechanism is not complicated.
Genetic material in microbes is more sensitive to (random) persistent mutations than the DNA and RNA of more complex organisms. These genetically slightly different microscopic siblings may have slightly different effects on patients. Now, the toughest ones kill off their hosts in no time and then their days are numbered — till a few hours after death. If they don’t succeed to infect others during the short sickbed and the day after death, they die out with their victim. But variants that have a better survival rate are those that make the patient less sick, less quickly (so they stay up, out and about, infecting others) and preferably don’t kill — because as long as there is life to parasite on, there is hope to spread.
So, the virus doesn’t calculate and doesn’t understand which would be its smartest behavior. The nicer ones just are spread earlier and longer.
And this is how, overall, microbial infections over time get milder but make more people sick. The seasonal flu is a good example of a virus that’s generally not as dangerous anymore. But it is so contagious that lockdown wouldn’t stop it. But it doesn’t kill as many people as does the newest coronavirus so far. Meanwhile, at the beginning of getting milder, the virus may still kill even more people than before, as I’ve explained before.
COVID-19 has one trick up its sleeve that is far superior to most agents of infection. The host spreads it best before s/he feels sick at all. I don’t think that it ‘wants’ to give that one up. That means that our best hope against this epidemic is prevention through vaccination. Smart people take little risk until safe and potent vaccines will be ready and available.
Meanwhile, don’t forget that this virus does much more than spread and kill. It can take people down for months. Even healthy young people, who were hardly sick at first. Many of them went from full-time workers and athletes to being chronically exhausted already for three months. Medical scientists sometimes are so anxious about death that they forget that there is more to well-being than not dying. There is a good reason for the younger and the healthiest people too to try and avoid getting infected.