The problem is JIT is all about steady state operation, and hinders the ability to scale up.
If you have a substantial buffer, when demand picks up you notice that you are drawing from your buffer at an increased rate and you order things early so that you can scale with that increased demand. It's okay if your suppliers need some time to hire additional labor or buy a new machine, even at this increased rate of consumption you still have some time before your stocks run out. There is no need for you to pay your suppliers a premium to drop their existing orders from other customers to support your demand.
If you don't have that extra buffer, then when demand increases there is no avoiding shortages - not only do you need to scale up to increase production and meet this new demand, but now you also have an ever growing backlog of orders that you also need to fulfill. These companies scramble to rush in material and equipment asap, which drives up prices and drains the stocks of other companies, and pushes the problem further up the supply chain. Firms that aren't actually seeing an increase in demand nevertheless must buy more to guarantee their buffers will not run out, further increasing shortfalls in production. What could have been a localized hiccup cascades into a global economic problem.
However it's important to note that the pandemic was not simply a shifting in demand patterns. Early on production in many cases stopped or was extremely reduced as employees quarantined and businesses cancelled orders expecting various drops in consumer demand. Again here, JIT is a problem as it led firms to cancel orders much earlier than they should have, and it makes restarting lines much slower. For example auto makers cancelled their chip orders right away at the start of the pandemic expecting people to save money and not buy cars, but it turned out demand for cars increased, and a lack of chips grinds auto manufacturing to a halt. If the auto manufacturers had just accepted that their inventory of chips might sit on a shelf a little longer, the counter intuitive uptick in demand would have been a blessing instead of a curse.