HAGS should be Disabled & that Nvidia driver you have installed could be an issue too. FWIW, I've been using Studio driver 522.30 with no issues.
These aren't fixes for your recording stopping but should be done.
Disable Game Bar/DVR
Fix this Scene, create a new Scene for each Window/Game Capture, only (1) per Scene.
13:48:35.738: - scene 'Gaming Scene':
13:48:35.738: - source: 'Window Capture 2' (window_capture)
13:48:35.738: - source: 'Game Capture' (game_capture)
13:48:35.738: - source: 'Window Capture 3' (window_capture)
13:48:35.738: - filter: 'Color Key' (color_key_filter_v2)
13:48:35.738: - source: 'Image 3' (image_source)
13:48:35.738: - source: 'OpenVR Capture' (openvr_capture)
13:48:35.738: - source: 'Audio' (group)
13:48:35.738: - source: 'Audio Input Capture' (wasapi_input_capture)
13:48:35.738: - filter: 'Noise Gate' (noise_gate_filter)
13:48:35.738: - filter: 'Noise Suppression' (noise_suppress_filter)
13:48:35.738: - filter: 'Compressor' (compressor_filter)
13:48:35.738: - source: 'Audio Input Capture 2' (wasapi_input_capture)
13:48:35.738: - filter: 'Noise Gate' (noise_gate_filter)
13:48:35.738: - filter: 'Noise Suppression' (noise_suppress_filter)
13:48:35.738: - filter: 'Compressor' (compressor_filter)
13:48:35.738: - source: 'Desktop Audio' (wasapi_output_capture)
13:48:35.738: - source: 'HUD' (group)
13:48:35.738: - source: 'Overlay' (browser_source)
13:48:35.738: - source: 'Image' (browser_source)
13:48:35.738: - source: 'Wayne' (image_source)
13:48:35.738: - source: 'Dr Perky' (ffmpeg_source)
13:48:35.738: - source: 'Chatbox' (browser_source)
13:48:35.738: - monitoring: monitor only
13:48:35.738: - source: 'Capture' (group)
13:48:35.738: - source: 'Video Capture Device' (dshow_input)
13:48:35.738: - filter: 'Background Removal' (background_removal)
13:48:35.738: - filter: 'Chroma Key' (chroma_key_filter_v2)
13:48:35.738: - filter: 'NVIDIA Background Removal' (nv_greenscreen_filter)
13:48:35.738: - source: 'MS PAINT' (window_capture)
13:48:35.738: - source: 'Display Capture' (monitor_capture)
13:48:35.738: - source: 'Goblin' (image_source)
13:48:35.738: - source: 'meme' (image_source)
13:48:35.738: - source: 'Window Capture' (window_capture)
13:48:35.738: - filter: 'Chroma Key' (chroma_key_filter_v2)
13:48:35.738: - source: 'Text (GDI+)' (text_gdiplus_v2)
13:48:35.738: - source: 'Image 2' (image_source)
13:48:35.738: - source: 'Sound Alerts' (browser_source)