To run space programs they'll need money. Even with resources they have running both war and space programs will lead to catastrophic consequences. But I suspect that's exactly the way they'll choose.
Of course, the price cap is only in force since December 2022, so the effects haven't fully shown themselves yet.
If selling oil was unprofitable Putun would just burn it instead of selling it at loss just like they burned natural gas for $10,000,000 / day for months.
[0] https://www-bbc-com.translate.goog/russian/news-50392407?_x_...