Iran has thrice the population of Ukraine and 1.5x (nominal) to 3x (PPP) the GDP. With Ukraine building 23560 drones for every F35 the US is building, it would be quite reasonable to expect Iran to be able to build a few thousand per F35 ass well. Iran already has a fairly mature drone industry supplying the Russian side of the UA-RU, after all.
In other words: If it were to come to a race of attrition, the US can't afford to lose a single one. Even ignoring the massive cost difference, F35s simply cannot be constructed fast enough.