Gcode viewer runs several layers ahead when "sync with job progress" is enabled

What is the problem?

Gcode viewer is several layers ahead as compared to DisplayLayerProgress plugin, or PrettyGCode or the actual physical print as observed. Number of layers ahead varies. It seems to get larger as the print proceeds observed difference was 7 layers ahead at the beginning of the print and now 9 layers.

The number of layers in Model Info is correct. I suspect that by the end of the print it may correct by the end of the print.

Now at 88% about 14 hours into the print it is showing 140/249 whereas DisplayLayerProgress shows 170/248 so it is running behind now.

Now it is at 97% and 210/249 whereas DisplaylayerProgress is 207/248.

I'll post a new log at the print end.

Posted, and it is a much smaller file.

What did you already try to solve it?

Reload the page, trying all the settings in advanced options.

Complete Logs

octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support! Not log excerpts, complete logs.)

Gcode:

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Octopi 17, Octoprint 1.4.2, Ender 3 V2, Marlin 2.0.6, Microsoft Edge, Windows 10