I would not say it's only acceptable for unintended shortages, or maybe very brief and rare shortages since those tend to be the kind you can't reasonably plan around.
As for saying the AMA kills people, not sure I'd go that far without doing more research. But I wouldn't be at all surprised if the effect of some of their policies is more deaths than there otherwise would be.
That effect is eventually balanced out by exhaustion, sleep deprivation, etc taking the same toll they do on everyone. Theoretically If you could reduce the impact of sleep deprivation, we could push shift lengths further, reduce the amount of turnover in carers a patient sees even more, and receive even further benefits in health outcomes.
Not enabling the same burnout for even longer shifts.
Burnout and just simple short term fatigue both also create patient risk.
We have drugs that would allow very long completely alert shifts, with few side effects for single use. But there is no way to do that regularly in a mentally (or physically) healthy sustainable way.
I can see those being used by a battlefield medic, or in a disaster zone, for one off critical situations.
Can we try to improve the handoff problem before trying to make sleep deprived doctors and nurses able to suffer for even longer?