And there are lots of things an AR can do that a shotgun can't.
You named one. Let's see some others. BTW my link showed a guy hitting a 4" target at 300 yards with a foster slug. Again the utility of being able to shoot long distances is pretty limited anyway. You haven't trimmed a tree. I haven't shot a deer at 600 yards. I wouldn't do it either. I might take shots at a groundhog or something like that at 600 yards or even more but it isn't like it is necessary. Sure long range shooting is fun but not many people hunt that way unless their hunting mountain goats or dall sheep. People do shoot varmints at long distances but they don't have to. It is almost a necessity to shoot dall sheep to shoot them from long range. But for every one thing you can list that an AR can do that a shotgun can't I can probably name two that a shotgun can do that an AR can't. And long range hunting counts as one just like shooting ducks, geese or quail is one. You do know that they use shotguns to clean out industrial equipment don't you? Things like kilns, blast furnaces and certain pipes can be cleaned quickly by blasting material off the walls that would have to be chipped off otherwise. They use shotguns to control birds around airports also. Then there's riot control with bean bags and the like. Then you can use rock salt to seriously discourage an invading pest animal without actually killing it. You can shoot a stream of fire using a magnesium shell. Makes great fireworks and does OK starting controlled burns of brush etc.. Even more effective is the magnesium loaded slug that doesn't ignite until it hits something. So if you want to set a car on fire from a distance you fire a magnesium slug into it. If you've ever seen magnesium burn you'll get the idea.
Did you know they have developed a long range taser that is fired from, you guessed it, a shotgun? There are exploding slugs that are basically small RPG's. Oh yeah. There are rocket propelled slugs too but they don't work very well. There are harpoon rounds fired from shotguns too. The Russians developed them. And there are teargas rounds which is also crowd control but it isn't a bean bag. There are even shotguns that sow seeds.
Stop me when you've heard enough. This is a long list.
There are flare rounds for a shotgun. There are flechettes which are darts loaded into a round that will penetrate body armor. I think you can fire about 12 darts at a time.
There's the old standard buck and ball round which combines the effects of a slug and a shot shell and does big time damage. There's the strung buck round which is two balls of metal attached to each other with a 6" wire. They not only tear up humans in a terrible way but they have other uses like knocking down power cables.
The list of things a shotgun can do is almost endless. Yes there are a few things an AR can do that a shotgun can't. I don't know how many times I have to say that before people stop insinuating I think that isn't true. But the shotgun does far, far more things than an AR ever dream of doing. I haven't even got into laser guided rounds which is something that has been developed only for shotgun rounds and BTW the distances involved are around 1000 yards.
A shotgun can fire bullet shaped rounds just like an AR can. How people figure it can't do what a rifle does is beyond me. There are no rounds available to do long range shooting it wouldn't be that hard to develop one. With a rifled barrel a shotgun is essentially just a big bore rifle. If the load development ws done it could shoot father than an AR. But in reality that just doesn't happen. The things I have mentioned aren't common but they are all produced for various purposes. I'm sure a person could develop a shot load for an AR but with a rifled barrel it would shoot a terrible pattern. It takes a smooth bore to shoot shot.
This really is a no brainer. It's a no contest question. A shotgun is light years ahead in the versatility department.