It can be shooter error or a gun related problem. The last time it happened to me was because the action thumb lever spring was bad. Other than a bad return spring it might be: A left-handed shooter may inadvertently hit the lever with his thumb during recoil; There is dirt in the action preventing the breech lock from from fully engaging; The gun can be just worn out and has enough free play that the recoil opens it; or the shooter isn't closing it with enough force and the block doesn't fully engage.
Some folks think they are doing the gun a favor if they hold the thumb lever back (open position) while they close and then release the lever after they've closed the breech… Close the breech with your thumb away from the lever and let the lock block snap into position, otherwise it may not fully engage.