Hi Ken,
Difficult to diagnose without being there, but….
To release the halyard it needs to be pulled up (tensioned) an additional 5-10mm. If the sail is hard against the sheave then this might be your issue.
To test this, tie a rope to the shackle, hoist it and see if the lock works. Without a sail the halyard shackle can go higher and prove the theory. If it works like this, a longer shackle will fix your problem.
Good luck,
Simon
hoult23@gmail.com