"Wouldn't a drone mounted .22 have better penetration?"
Sure, but that's not the whole story.
#4 buckshot, with a diameter of 0.24", has a velocity of around 1300fps (mild 12 gauge loads), vs. a .22 at around 1200fps. The .22 weighs in at around 40gr, the #4 buck at 20.6gr. Doing the math, the .22 has around 40% more energy on target (at short distances) ... combine that with stability in flight and projectile shape, and the .22 has the edge.
However, given a single shot there are a lot more chances of hitting the target multiple times with the shotgun.The shotgun fires around 27 projectiles, all hitting an area under 1 foot in diameter (depending on choke and possibly with a few fliers). And even with it's much lower energy, it's still powerful enough for each pellet to do major organ damage. There is a reason they call it buckshot ... it's not for hunting mice!
Note: I'm assuming typical "home defense" distances in the above, which seems reasonable given the topic under discussion. Likewise the #4x27 shot, which is a good all 'round load for this kind of thing.