I suspect if this is a new issue then the cause is likely to be wear on the cam surface of the shaft or the matching faces of the latch tenon plate that forms the latch.
I can't recall any designed in provision to counter this; it is a rudimentary moulded plastic affair, I suspect in ABS.
Build the worn cam face up with a bit of Aradite or "weld" on some ABS scrap using pipe solvent might be viable solutions. This will need dressing up with a file etc but not an overly challenging task to an enthusiastic DIYer.
Though I would take the easier route and simply carefully take a bit off the latch as suggested above.
Edit:
THIS link gives some hints of what one will find inside generic Hartnal locks.