`zoomToFit` called twice in a row causes slightly different zoom levels

I have a search feature that calls diagram.zoomToFit(); when a user submits a search query. This results in the whole diagram being visible. The strange thing is that if the user subsequently submits the same search query, calling diagram.zoomToFit(); again before making any manual changes to the zoom level, the diagram will zoom in a tiny bit more.

Any idea why calling zoomToFit twice in a row would cause slightly different zoom levels?

I just tried it with the Org Chart (static) sample, https://gojs.net/latest/samples/orgChartStatic.html. In the console window I repeatedly evaluated the following code:

myDiagram.zoomToFit(); myDiagram.scale

I found that the Diagram.scale value did not change after the first call to Diagram.zoomToFit.

So how can I reproduce the behavior that you are experiencing?