No, of course not. But the war cost them dearly. They'll try to recoup as much as they can out of Ukraine now.
I am still unclear exactly what the war cost them so dearly. Or perhaps we just value different things.
1. Russia's war machine production was down prior to the war. They had mostly been coasting by with Soviet-era trash. While they made new weapons, platforms, etc. they only made them in low quantities. Now their war machine is in full swing, and they're outproducing all of NATO combined on munitions. That's a win.
2. Russia's tech sector was highly dependent on US companies, as were certain areas within telecoms and even food manufacturing. With the sanctions, Russia has ramped up their tech sector and production. Again, a win for Russia.
3. Prior to the sanctions, China wasn't doing business in Russia for the highest profit sector (tech) at all, now nearly all the tech Russia has to go outside for is coming from China. This in turned opened up general trade between China and Russia. Again, win for Russia.
4. BRICS has been around for a long time. It was mostly a running joke. Thanks to the war, it is now a full fledged economic, political, AND military block. Now, rather than Russia being on poor terms with China, Iran, and North Korea, they're openly allied with all three, both economically AND militarily.
I don't know where the war is supposedly so "costly" for them. The only real cost to Russia, from this war, has been the human cost. And Russia is nothing if not reliable in ignoring human costs.