I was unable to reproduce this issue on our end with the steps provided. I have a couple of questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
Can you reproduce this issue in a clean project?
Could you try clicking a few times (the first click will set the input mode to focus UI and so it may not fire on the first click)?
You will need to manage your inputs so that the UI is focused before the user clicks. I have provided a link to documentation that provides some good information on this subject (Set Input Mode UIOnly/Set Input Mode Game and UI/Set Input Mode Game Only). I hope that this information helps.