Does your framerate drop when this occurs?

It sounds to me like your CPU is maxing out.

Easiest way to make sure keys always get passed is to raise the priority of the AHK script, In task manager, select the AutoHotKey process and set the priority at "realtime".

If it still occurs then I don't know what it is :-(