onClick only runs after clicking button twice after alt tabbing

I have a button, and I can wire an onClick event to it either via script

button.onClick.AddListener(() => Debug.Log("Click!"));

or I can assign a function to it via inspector in the On Click () list to do the same thing

The button works as expected, the Debug log runs when I click it.
However after alt tabbing back and forth to the game, I have to click the button twice to run the call.

What is weird is that the on the first click the animation of the button works (hovering over makes the button bigger, clicking it makes it smaller), but the callback doesn’t run.

Yes this issue also occurs in the build. I’m using Unity 2019.4.31f1, and Input System 1.1.1

Does anybody know how to fix this? I’ve dug into the code, tried lots of things, messing with the new input module settings and I’m tearing my hair out. Very frustrating, it’s a minor issue having to double click but I hate it and I see play testers encounter it

I updated Input System to 1.7.0 and that seems to have fixed it so i guess it was a bug, haven’t checked build yet I’ll update if that changes