I think the pettiness is a bone for him to throw at the MAGA base. When the US capitulates to Iran's demands, this will likely be one of the reasons the fascist cult in the US will use as a reason.
"We could have won, but our allies abandoned us, therefore we need to put them under heel even more."
That's the narrative I expect at least.