As you said, the Iranians are smart and they understand the Chinese mentality quite well.
They have let Iran down many times and stabbed us in the back at every turn, but now that Iran is winning this war at a great cost to our country and infrastructure, they're the first one demanding credit!
They have ruined Iran with their "friendship" with us. 4 rounds of UN Security Council sanctions that crippled our economy. A recent UNSC resolution that enables GCC states to ask for reparations from us through the ICJ, effectively ruining our already fragile economy even further. And another UNSC proposal by Bahrain that is in the making as we speak and will legitimize military force against us, which is probably going to be passed again.
The US, particularly under a maniac like Trump, is an absolutely terrible enemy for us. But when we were on friendly terms with them, they did help Iran a lot and built a lot of things for us that lasted decades. The modern Chinese did nothing for Iran even when we were having peak friendly relations.