Steps to reproduce:
1) Create a new creative world
2) Retrieve a spawn egg of any mob and a boat
3) Place the boat down
4) Attempt to shift right click while aiming at the boat and holding the spawn egg
Observed Behaviour: The mob is not spawned but the right click animation plays nonetheless
Expected Behaviour: Either the mob is spawned or the animation does not play.
I was unable to reproduce this in 22w19a