Cleanup Tracks and Vias tool

I think you have discovered an edge-case for the cleanup-tool. There is an track with 0.000 length directly at the endpoint of the track which gets deleted.
A 0.000length-track is essentially a point and is therefore colinear with all tracks which share the same coordinate. So it’s ok that the “merge-colinear segments” algorithm is working, but I think the merging-calculation goes wrong.

If you have time please open a bugreport at gitlab (kicad → Help → Report Bug) with your reduced project.
If you don’t want to do it yourself say a word.