Are shotguns the only way to play close ranged fights?

I have infantry bayonet because I can be good both in middle and close ranged fights but in close fights people usually camp/run around with shotguns and I don't know how to counter it. I use consumables such as dynamites etc but they don't usually provide much value.

I know the "play your range" thing, but that will create an unnecessary scenario of stalemate.

How do I play close quarters fights without needing a shotgun?

Edit: I also find myself playing aggressive trying to breach in the building moving around everywhere trying to find openings