Full screen solves this. I understand not everyone can play on Fullscreen (on this computer I can't even play at all XD) but that's the best solution.
You could also just lower your desktop resolution to something closer to the game resolution so its near impossible to click outside the bounds of the game.
Or just learn to keep your mouse closer to your character since s/he only aims in whatever direction you are currently pointing, distance doesn't affect it. Even with guns it would be better for you to learn how to hit an enemy without always clicking on the enemy. An inch or two away should suffice.