I had issues with screen recordings with Kazam or OBS, not during recording, but after when viewing the recorded video, there were some weird flickers showing parts of what was under the fullscreen application or window (could be the desktop wallpaper, the firefox window opened before the fullscreen application, whatever is 'under' the active program), similar to what we see in this image.
I found a simple fix to that here https://github.com/phw/peek/issues/86#issuecomment-283801192 on Peek's GitHub issues page, all these programs have similar issue when recording the screen, very likely the same origin of the issue.
I unticked the box "Allow Flipping" in the NVidia Settings ("Sync to VBlank" is also unticked in the image but it already was, regarding some gaming options I changed long time ago)
This completely fixed the flickers in the video while recording the screen.
To test next is a long TeamViewer session to see if It also fixed these horrible flickers (very similar issue but it was even worse) that made the experience miserable, especially when you add latency and random other TeamViewer glitches.