its har to tell much from the picture but
a set screw on top of the key + 1 90degrees from it, is a very common way to do that.
If loctite isn't holding the set screw, CLEAN the hole and screw first, loctite primer helps too.
IF you have room (deep enough hole) double set screw, the top one will lock the bottom one, just make sure the top one is a flat end
you may need to check the linkage alignment. It sounds like you have a problem with some side forces on the cam pushing it side to side. possibly the piece welded on the cam has a crooked hole.
as a last resort weld it to the shaft