Except Iran has a better economy on per capita basis than Pakistan and India, who are both to some extent darlings of the west.
There is no objective indication that US sanctioning someone really affects their economy on a macro scale. It's the same as with EU, the economy is doing badly due to several geopolitical factors but non-UN sanctions are probably not really a measurable part of that, or at least very premature to draw the conclusions that it is.
The reason Iran does worse than China/East Europe is more likely that it's just not an efficient government system to have religious leaders running the show. China even warned these various Muslim guys with their actions in Xinjiang that they do not consider Islamic led politics valid.
Countries who adopt a para-socialist/state led economy structure have been the big economic winners in the last 20 years (China, Russia, Japan, SK). Various types of oligarchies have been able to keep their living standard roughly the same unless they come under pressure (EU, US, Brazil, Argentina etc). Then further below that are various types of fundamentalists like Iran, Turkey. Then even further below are corrupt 3rd world basket cases.
There's a reason China's approach in the middle east is focused on Saudi first, because a personalistic dictatorship is easier to reform than the religious/conservative cluster fuck that is Iran. Ultimately the goal for China in the region is to control the resource supply and shipping routes. What US did wrong when trying at the same goal is that they didn't work on the people, they just used violence or bribes on the leaders. A succesful middle eastern policy must include reform away from the negative tendencies of the region, opening up those nations to economic improvement. Otherwise China will just be thrown out at a later date like US is being.