Good job , it is important to separate the operation of a circuit in parts and review it from one end to another to determine the problem. Now, could you solve it?
Usually the mechanical buttons are damaged after time of use, it could be that at some point the button stops performing its function, which prevents the continuity of the circuit and resets to standby mode. This is a commitment, I have never had the opportunity to use one of those flashlights and I do not know its possible faults.
RE: How does that shake flashlight work