I'm sculpting with Dell Premium Active Pen (PN579X), which has two side buttons ("top barrel button" and "bottom barrel button") and one "top pen button" (I'm using only the side buttons, not the top one).
I've set bottom one to be right click for orbiting, when I start orbiting by clicking bottom one and then press the up one (which is easy to trigger by accident) while still holding the bottom one, Blender gets stuck in orbiting as if it does not register the button release event and acts as if the orbit button is kept being pressed. If I click on pen buttons nothing happens until I press escape key on the keyboard, or middle button on the mouse, which both also exit orbiting normally.
Additionally for the pen, when I press those two buttons at the same time in any order I see a white dot light blinking between those two buttons which is not the same as the light from the top pen button for which the active pen docs say it starts Bluetooth pairing mode, and it doesn't pair with sidebar buttons so I have no idea what it's for, but it might emit some event that interferes with Blender event listeners.