You will need to install a user script manager extension to install this script.
Bypass attack, hold item, place, and other functions without getting kicked by the game.
Although the game no longer kicks you for such calls, it might still come in handy, anyway give it a try.
This script won't protect you if you accidentally double-click on an item to select it. And, it's not compatible with other scripts like "key rebinder," "reload timer," and "weapon variant progress".