Buckshot/slug/55 grain .223 round are all about the same as far as penetrating interior walls. All of them will penetrate many.
If you want enough power to stop a goblin, then you will be dealing with penetrating several interior walls if you miss.
There’s really nothing you can do about it, except don’t miss.
You could use something less likely to stop the bad guy, like birdshot, but I don’t recommend it.
Actualy at up to ten feet or so bird shot will stop an intruder quite as well as a solid slug. With the shotgun barrel jammed into the gut a twelve gauge blank with the shot dumped out of it will stop him. Jon Eric Hexum did a fine job of killing himself with a hand gun loaded with a blank.