Cleanup Tracks and Vias changes tuned track length

Hi
When working on a larger PCB, I notice a weird behavior of the Length Tuning Tool in combination with the Cleanup Tracks and Vias function. Below I reproduce this with a simple example.

I tuned the Track Length to 40.0mm with the Length Tuning tool.
Then I run the “Cleanup Tracks and Vias” function.
And after this my tuned Tack Length changed to 41.7mm.

Questions:

  1. Why does the Track Length change?
  2. What is now my Track Length? 40mm or 41.7mm?
  3. Is this a bug?
  4. Should the Cleanup Tracks and Vias function not be used together with the Length Tuning tool?

I used KiCad 9.0.0 on Windows 11.
Thanks for the support.