I have had this very problem, and also fixed it.
The problem is with the solenoid, not the lock assy
The problem is the motor in the solenoid is worn and failing, it cannot generate enough force to pull the spring properly
Mine would work most times the first time I pressed the button to unlock the boot, and if it caught first time when I shut it it would lock OK, but if it failed to catch the first time, then opening it would result in no chance of the lock catching correctly.
I took the solenoid off the car and applied 12V to it in on the bench, it appeared to work OK, but when I repeated the test it got slower, the more times I operated the solenoid in quick succession the slower it got.
So, I stripped it down, and tried the motor on its own, it appeared to run OK, but after about 20 seconds it started to get rather hot
I did take the motor apart and found the brushes and commutator were almost worn away.
I tried a lot of sources for a replacement motor, but could not find it anywhere.
A2steve to the rescue who provided a used but working replacement solenoid for I think about £7.
I bench ran this and found it was MUCH quicker to operate and would repeat many many times at the same speed
Once fitted to the car, the lock catches 95% of the time first time, and almost always on the second attempt. There is an optimum height to drop the tail gate from which is about 6 to 8", this greatly helps to prevent the bounce
Apologies that I answered your PM with conflicting information, I answered the PM before reading this thread so did not have the context of what was happening and just responded to the fact contained in the PM
Cheers,