I don’t know which kind of shotgun loading you have in mind but sufficiently effective shotgun loadings (read not bird shot) will 100% penetrate dry wall several times before reaching a not fatal velocity. High mass projectiles maintain course better when flying through materials like dry wall.
A cartridge like .223 which relies on velocity, instead of mass, tends to penetrate walls the least. This is because upon it’s first impact it begins to destabilize, resulting in a faster loss of velocity.