Can you please post your updated python code?
Klipper is pretty picky about asynchronous stepper motion. I suspect you’ll have to acquire the G-Code mutex, which will complicate your code quite a bit as you need to queue your motions then execute them.