How to reproduce
In creative mode, get a dispenser
Look at a block
Hold right-click
Expected result
Dispenser is placed, then accessed
Observed result
Dispenser is placed, then player's arm swings over and over, accomplishing nothing. If you look away from the dispenser, you'll place a second one exactly once, then all interactions will cease despite continuing to hold right-click.
If you do this with a barrel, the barrel visually opens, creating a bugged block state.
Seems fixed to me in or before 1.20.40