The shift to the right is caused by processing delay. By the time the code determines a pixel should be on, the scanline has advanced to the right for a few microseconds. I don’t think anything can be done because an Arduino can’t be sped up and a video scan line moves very fast from a timing perspective.
The flickering you are seeing at the top in the second video is timing difference between the video signal and the overlay. Try increasing the frame delay from 2 to 5. That reduces flickering but your overlay will update less often.
The Video Experimenter is very primitive, so I’m sorry there are limitations.