I believe there really are two distinct conversations, shot guns in law enforcement and shotguns for home defense. Although some of the considerations may overlap there really are a lot of considerations that apply to one role and not the other.
Here is a thread that although it has some noise has a lot of on point discussion about shotguns in a LE role.
https://primaryandsecondary.com/forum/index.php?threads/shotguns-why.74/
It is undeniable that shotguns have begun to be supplanted by AR type guns. That doesn’t mean that the shotguns do not still posses the same virtues they always did. Rather it is a reflection of the fact that rifles netter serve the role of a patrol weapon for most people.
A shotguns greatest virtue is that brings to bear unmatched power (compared to pistols, sub-guns, and intermediate caliber rifles.)
Shotguns are still considered by many to be a superior choice for vehicle take downs. This is due to more reliable penetration/performance when passing through barriers like windshield glass. Advancements in barrier blind ammunition have made rifles do better than in the past but a slug or even a load of plated buckshot is still more reliable.
Shotguns have been used for firing less lethal munitions. However, many agencies have designated less lethal guns. More and more are moving to 37 MM less lethal. Look at Dane Reister, a police officer in Portland, who was indicted for shooting a man with “lethal” rounds that he mistakenly loaded into a less lethal option. He was indicted, ultimately committed suicide and his agencies took heavy criticism for not have better policies to prevent that. They also paid out a multi million dollar settlement. It is hard to imagine any bureaucracy not have policy that only allows less lethal in designated less lethal guns. The 37 mm launchers not only avoid this issues they are generally considered more effective too.
There is no “one true sword,” all weapons have strengths, weaknesses and are generally a set of trade offs. Shotguns have a number of limitations and drawbacks.
Recoil: 12 gauge shotguns firing, even reduced recoil 2 ¾ slugs and buckshot, recoil significantly more than 5.56 weapons or sub-guns. I have heard many trainers opine that their observation has been that to truly effectively run a 12 gauge pump gun a person must be of a certain stature and strength. The shotgun is not an egalitarian weapon than anyone can easily wield.
Training/manual of arms: In my experience shotguns, particularly if you are talking about the full breadth of what they can be used to do, take more training and more work to stay proficient. Training time and budgets are often limited. Moreover, it’s been my observation that many officers are not really gun guys and not interested in putting in more time or training that what is requisite. The manual of arms is more complex with a shotgun, and differs more from a pistol as well. Also there are many people familiar with the M16/M4 from prior military service.
Ammunition capacity: Shotguns are limited capacity weapons. Also most officers who have a shotgun in their vehicle do not carry extra ammunition on their persons. Most with rifles do not carry additional rifle magazines. They often are grab and go weapons. Although incidents in which officers fire 20-30 rounds are, as near as I can tell, uncommon (there was a shootout a few years back in which about 250 rounds were fired in total by the police, the bad guy was shot twice. 17 of the suspects shots hit officers killing 1 and wounding a number of other), active shooter incidents and the like are not something I would want to run into with 6-8 shots in a shotgun.
Precision: A rifle is simply a more precise weapon. We can imagine all kinds of hypothetical situations where that advantage might matter. This is particularly true as the distance increases.
Ability to penetrate armor: The north Hollywood bank robbery and subsequent shootout in 1997 changed the calculus for many agencies. It occurred around the same time as the shootout with Carl Drega in Vermont. Another incident that changed how LEA equipped their officers. Drega was armed with a rifle and had body armor. Prior to being stopped with a rifle, he had taken a shotgun slug to his protected chest. This occurred in a rural area and drove home the idea that officers anywhere could face these types of scenarios and threats.
Versatility: People often champion the shotgun for its versatility. It is true it can do a number of different things. However the same shotgun is often not used for those things. It can be used for breaching or less lethal munitions but those typically are dedicated guns. The patrol rifle offers great versatility. Unlike the shot just about anyone can shoot it and operate it will with training. One can zero the gun such that you are getting only a few inches high or low from 0-300 yards. Although there are still situations in which the shotgun shines, the rifle covers a broader range of scenarios.
In summary, rifles, shotguns, and sub machine guns all have strengths, weaknesses, and present a different set for tradeoffs. There are still situation in which really dialed in users might still prefer shotguns, or subguns. I was speaking with dignitary protection guy not long ago about their selection and use of a particular subgun. That said rifles chambered for an intermediate cartridge have taken over many of the roles once dominated by either shotguns or submachine guns for a reason. That doesn’t mean the others couldn’t still be used effectively or don’t have strong points.