Why would anyone run a 5” 5.56? A 10” would make much more sense, and the added length won’t make any difference in CQB.
Sound and flash works both ways, and the majority of both are going AWAY from the shooter, TOWARDS the target, so it’s added shit the threat has to deal with.
Under extreme stress, very little of the noise and flash will be noticed by the shooter to an extent that it will adversely affect them at the time.
Either will work just fine, with the right ammo in each. I wouldn’t feel poorly armed either way for HD. For use outside of the home, a carbine caliber beats a handgun caliber, hands down. Range and penetration.