1. Your audio device has a sample rate that doesn't match the OBS Sample Rate. This can result in audio drift over time or sound distortion. Check your audio devices in Windows settings (both Playback and Recording) and ensure the Default Format (under Advanced) is consistent. 48000 Hz is recommended.
OBS Sample Rate: 48000 Hz
Line (AG06/AG03): 44100 Hz
2. Run OBS as Admin. Right click on the OBS shortcut, properties, advanced, check box, ok, apply, ok.
3. Record to MKV. If you record to MP4 or MOV and the recording is interrupted, the file will be corrupted and unrecoverable.
If you require MP4 files for some other purpose like editing, remux them afterwards by selecting File > Remux Recordings in the main OBS Studio window or enable Auto Remux in the Advanced Settings.