As far as I’m aware, this only affects using the volume buttons.
I think, you’re accidentally pressing the Action Button.
To disable the Action Button, go to Settings > Action Button and swipe left until you see this:
View attachment 2385444
Even with the Action Button disabled, you can still silence/mute or unmute your iPhone via Control Center:
Apple's iPhone 15 Pro and iPhone 15 Pro Max introduce a new programmable Action button that replaces the traditional ring/silent switch above...
www.macrumors.com