Sometimes game starts to flicker after a few minutes

I was getting some random flickers too, however I could rule out my monitor as I recorded my screen with OBS and I can see the flickers when replaying the recording. For me it turned out to be DX12.