There is no way of knowing how you have the Looper algorithm parameters configured, or exactly how the keyboard routed to the H9. What is the brand / model of the keyboard?
Is the keyboard capable of transmitting MIDI Clock? One MIDI cable; keyboard MIDI Out to H9 MIDI In. A couple of parameter settings on either side of that cable. Perfect sync. You’re going to want this for almost any algorithm … most certainly for looping.
Here’s all of the Looper information in one place. It’s a little difficult to absorb all of the nuances in a casual read. But it makes more sense after a couple of passes; especially with some H9 hands-on mixed in. https://com-eventide-drupaluserfiles.s3.amazonaws.com/download/file/Looper.pdf