I disagree. I think Russia did a cost-benefit analysis on continuing support for Assad vs. pulling out and decided to pull out and see what happens afterward.
Russia's economy is very strong. In addition to oil, Russia has gas, rare minerals and a huge portion of the world's fertilizer market (among other things). Since the US started heavily sanctioning them in 2013, they have become nearly autarkic.
Are Russian goods' quality at the level of the West? No, in some areas not even close. That is not the point. The point is that they are able to continue to thrive both militarily and domestically (from what I've read - I'm no expert) after being completely cut off from the West commercially and economically.
All that being said, Russia is not all-powerful. Assad appears (again, I'm not an expert) to have been a weak leader not able to control his corrupt family and cronies. Thus after Russia pulled Assad's chestnuts out of the fire in 2015, Syria was not able to rebuild because the money coming in was getting skimmed off.
Assad refused to meet with Erdogan. He refused to negotiate with other key players in the mid-east. He refused offers from China. Russia would have had to invest huge sums to save Assad - again. If they were successful, there is no guarantee that in another 4-5 years (after 4-5 years of fighting) they would not be back in this situation again.
Taking a step back from Syria and assessing the new government seems like a better tactical move to my mind.
I'd say the odds that Syria descends into a real civil war in the next 2-3 years are about 50:50. At that time, Russia can watch without having a dog in the fight and then tip the balance or just make peace with whoever wins to get their ports back.
The idea that not fighting everywhere shows weakness is only true if you think you are omnipotent. Humans and human institutions have limits to how many activities can be done well simultaneously.