>There were still helicopters and slower ground attack aircraft to do gun defense against
The biggest reason why gun systems are avoided nowadays is simply range. You are mostly unable to fling slugs out beyond 10 miles, while a Patriot and friends can reach out and ruin a day at 100 miles. The helicopter itself likely has a weapon that will ruin YOUR day out to about 12 miles. That means the helicopter safely murders you, and you cannot defend against it.
Also MANPADS take up the 10 mile air defense slack nowadays, which is why nobody developed anything further into SPAAGs, right up until everyone had the same "oh god time to re-learn how to skeet shoot against small drones" idea
The biggest reason why gun systems are avoided nowadays is simply range. You are mostly unable to fling slugs out beyond 10 miles, while a Patriot and friends can reach out and ruin a day at 100 miles. The helicopter itself likely has a weapon that will ruin YOUR day out to about 12 miles. That means the helicopter safely murders you, and you cannot defend against it.
Also MANPADS take up the 10 mile air defense slack nowadays, which is why nobody developed anything further into SPAAGs, right up until everyone had the same "oh god time to re-learn how to skeet shoot against small drones" idea