The gap between weeks and years is big, though. Even in peacetime conditions, this process could be sped up if necessary. Indeed it might not make any sense at all to think in years and decades when it comes to such a quick-evolving industry. Whatever drone the DoD sets in stone now, will likely be obsolete by 2030.
The Ukrainian drone industry isn't particularly expensive, BTW, and mostly grew up from private sector grassroots. Ukrainian military has had its own share of problems with ossified Soviet-era leadership. They were able to route around these, though. The US does not want to do this so far; probably too much money involved, and not enough risk to rock those boats (or yachts).
On Iran, describing the US as "inable" to win is structurally incorrect. The US could always win the war whenever it wants to.
Are you sure, with the shortages of equipment that take years to replenish? In what sense? I am not even sure if the US has enough naval capability to make a D-day-like landing in Iran right now. That requires specialized ships and training.
The US could probably win the war if it went in fully: as you say, if it was fully mobilized and restructured into a war economy like Ukraine. But that is already quite a bad situation to be in. If a superpower needs to do this in order to fight someone like Iran, it is not really a (conventional) superpower anymore.
The US could also wipe Iran using nuclear missiles, but the political ramifications of such a step would be catastrophic.
So could Pakistan. Pakistan has enough nukes to wipe Iran off the Earth (not that they want to). But no one mistakes Pakistan for a superpower just because they have deliverable nukes.