Which is generally preferred? How does enabling this feature in the camera affect the RAW file that gets generated, and can RAW image managers detect that the camera has already applied a correction?
The in-camera correction is only applied to JPEG images (or previews) generated by the camera. In-camera correction has absolutely no effect on the contents of the actual raw image data from your Canon EOS 6D Mark II.
This is not universal, however.
Although it does not affect any lens you can use with your EOS 6D Mark II, one should be aware that with some lenses, such as the new RF 24-240mm f/4-6.3 IS lens, there is a significant amount of lens correction going on with the camera generated JPEG that can not be turned off in camera. This is similar to many small, light, and inexpensive lenses sold for the Micro Four-Thirds format as well as some of Sony's E-mount lenses. Rather than correcting for most distortion and vignetting via optical lens elements, as is generally the case with Canon's EF lens line, they've left the correction to the post processing pipeline. Many raw image editors automatically apply some or all of the correction when opening the raw file, regardless of what options are selected in the raw application. In the case of the aforementioned RF 24-240mm, the actual raw file includes more information at the edge of the frame that is not displayed by most mainstream raw editors/convertors. The actual angle of view provided when the lens is zoomed all the way out to 24mm is more like 22mm, then distortion correction crops back to a 24mm angle of view.