Button UI Not Working with The new Input system

For anyone looking at this after Oct 2024:

My issue was that once I added the InputAction component, the default InputSystemUIModule stopped worked and I couldn’t click anything.

I tried to fix it by copying the default InputAction into the one I am using, but it didn’t work and I was puzzled.
Turns out that when you copy a control scheme it only copies the events and not the assign control inputs.
After manually copying and re-pasting each once + adding my own custom controls, everything worked.

I copied the UI ActionMaps into my own.