You burn a barrel of oil once. A solar panel lasts for 20+ years. After you have installed it, if China announces they will no longer sell new ones - you have two decades of lead time to start building your own domestically.
Either way though, you don't have 20 years to get up to speed.
You have 20 years minus one day, as every day elapses.
Existing installed solar capacity is degrading at one day per day.
There is no product on the planet that has a a multi decade warranty with this kind of performance guarantee.