How do I deselect a tool?

You can't. I suggest having the Scythe equipped normally, as it doesn't use energy when accidentally swung, and doesn't have any effect when right clicked.