From a diplomatic perspective, it might be perceived in this way, but Chinese politics, like most country's politics, is ultimately domestically focused. My sense, having observed the changes in and around China from when Xi took power, is that the shift in China's policies cannot be analyzed in terms of a single leader enforcing his vision of unilateralism. Rather, the changes are the product of a gradually building process, in which CCP hawks became increasingly concerned with the infiltration of liberal institutions and values, on one hand, and the decentralization and loss of control that attended globalism in the post-Deng years.
In other words, taking back control of China from corporate globalists, their political collaborators, and Western infiltrators was considered an existential crisis within the CCP, the result of which was a rapid process of centralization occurring in the late Hu and the early Xi years. The "war against corruption" that Xi launched was essentially the climax of this process, in which the party purged itself of political challengers before going after corporate globalists like Guo Wengui, Ma Yun, etc., all of whom were forced to flee or step down.
I have written about this before,
Going forward they pretty much only have 2 choices. China could keep using it's reliability and hope to win over most countries while ignoring destabilising ones that hurt their own credibility, or it could launch a counter containment plan to shut off the US but which will in the long term set back Chinese international standing.
As of 2020 China seemingly already switched from focusing on moral high ground only to a hybrid strategy. Beijing has not yet taken decision to fully acknowledge the American danger but is preparing to take countermeasures on publicly acceptable American targets like Boeing for example. However, something like more widespread sanctions on America would be politically unpalatable in China, at least as things currently are.
China doesn't want to be seen as "fighting dirty" which might set back it's reliability. That might change if US (or other countries/groups) ratchet up their hostile activities.