Printing head doesn't wait for filament change

Basic Information:

Printer Model: TwoTrees SP5
MCU / Printerboard: Bigtreetech SKR 1.4 Turbo with Fysetc TMC2209 drivers
Host / SBC: Raspberry Pi 3B+
klippy.log
klippy.log (5.6 MB)

Describe your issue:

I am printing some keychains with a color change in the last 40 minutes of printing. It happened that when I changed the filament, the print head moved into position, ejected the filament, but then immediately returned to “printing,” so I didn’t have time to replace the filament… Then, when I pressed Pause (to save the print and try to replace the filament), the print head stopped, moved to the side, but immediately moved back and started printing again, and the only way to stop it was to press Cancel. Could you please advise me on what to do? The problem is probably with the M600 (I think).