Why are non-contact voltage detectors sensitive to vibration?
Slapping, shaking, or dropping a device with a battery can jar the battery, temporarily disconnecting the internal circuits from the power source. This forces the device to run through start up until the power source becomes reliable enough. This can cause strange behavior of the circuit, as the internal nodes may go into unusual states during power up.

The response may be different between different devices because of different mechanisms securing the battery. Some batteries are more secure than others, and don't get jarred as much when slapped.

To test if this effect is causing a failure in a device, there are some tests that can be performed:

1) Make the battery housing and contacts more robust against mechanical shock and again perform the mechanical stimulus. If the strange behavior is no longer observed, it was likely due to the effect described above.

2) Connect an oscilloscope to monitor the internal on-board power supply. This should be done without affecting the test set up too much. That is, you want to keep the device as similar as possible to the state in which the failure or strange behavior was observed. Apply mechanical shock and observe if fluctuations occur on the power supply using the oscilloscope. If the strange behavior in the circuit is still observed, but the power supply is unaffected, there must be some other effect causing the strange behavior. If the strange behavior is observed and the power supply has significant fluctuations, the failure mode is likely to be as described above. If the strange behavior is not observed during the test, then the results are inconclusive.