Why is the left mouse button sometimes unresponsive?

Basically If I hold down left mouse button a function timer will start and loop when I let go of the left mouse button the timer will stop. (Its basically for firing a weapon)

So I made a new project with the same code, and in the editor its works perfectly along with the standalone; but when I packaged it I get the same problem.