The switch actuation wire is possibly too high/too great an angle, might be allowing the ball to roll back? But it looks like a mechanical set up issue (see my very first suggestion) and should be able to be sort with some tweaking.
When it was working OK - the switch gap was almost non existant...Making it activate when flippers being used etc...
By hand it feels perfect and very smooth.
Look at your photo and mine...The centre of the metal gate vs the switch hole? Not sure if its the angle of the camera or not.....