I have the same problem here on my Surface Pro 6, i5, 8gb RAM.
It only happens in Onenote when using the pencil tool. For me the problem started after the dark mode update.
It works fine for a while, but then all of a sudden Onenote freezes for a short second and afterwards the screen flicker every time i touch the screen with the pen(with pencil tool selected).
The other tools, like marker and pen, still work fine.
Tested in other apps aswell, with no problems.