Yeah, unfortunately this is something you've got to check for. You can't expect the client to click accurately 100% of the time, after all this is a live game so barriers such as latency fluctuation can cause misclicks.
There are other similar situations you might want to consider adding checks for as well, for example if the script misclicks on a bank at an inopportune time, misclicks a ladder, accidentally opens the store/collection box, etc.
Best of luck
Apa