To my knowledge there's no such setting in AOSP, having combed through the system options in several major LineageOS (19 at the time) and CyanogenMod releases.
The only method I know is to delete the related file (I've also wiped the entire folder contents) in
/system/product/media/audio/ui/ using root or alternative using the 'do not disturb mode' at all times.
The stock camera app (e.g.
com.android.camera2) may or may not have an option to turn off the shutter sound.