This feature exists to avoid accidental clicks while typing on your Laptop. There's a feature called 'Palm Protection' that disables your Touch Pad completely when a key is pressed on the keyboard. The actual cause of this problem is your Touch Pad's software. Please note that this is not officially supported way of playing Garry's Mod.
This problem is most likely caused by you using a Laptop Touch Pad in order to play Garry's Mod. I cannot click on anything in Garry's Mod while playing
This article will describe most common problems with Garry's Mod and how to solve them.