When a loading screen appears during the frame processing, the frame number returned by the viewer is incremented and the stats reporting goes into the wrong frame. Pass frame number and stats object from the main thread to avoid this.
Using "" makes clangd to find unused includes which makes it quite easy to remove them.