This is true, if we take into account the economic aspects, then China is completely benefiting from the Ukrainian war, despite the stagnation in which the global economy has entered since the beginning of the Ukrainian crisis. But this may not be accurate, as we took into account that China needs a strong ally in the face of the threat of military confrontation with the West. We have seen how the United States rushed to fabricate crises in Taiwan with the aim of disrupting it from providing support to Russia.
It can be said that Russia would not stand in its war without supporting China, and China will not be able to withstand (militarily or in proxy wars) without a strong Russia ally.
China is in a difficult situation. Politically, they want to support Russia. Because they know that once Russia is destroyed by the NATO, then it is their turn next. However, economically China needs to maintain the strong trade relationship with EU and the US. If that is disrupted, then the Western bloc will use the opportunity to move the manufacturing hubs from China, to other countries such as India and Philippines. So China is now being forced to chose between long-term benefit and short-term benefit.