Iran and Russia are allies, Iran is pretty much the last one they've got in the region. It's in Russias medium/long term soft power interests that the current government isn't toppled.
The war itself isn't improving Russias bottom line as much as Trump dropping sanctions. The global price of oil didn't matter much as long as the price caps were in place.
I used to think that too, until the pattern emerged that he's outspoken only when it's about Russia or Russian-aligned countries. His "interview" with Putin really was the icing on the cake.