UI image with button component not tracking mouse correctly

So I have an inventory system with slots, the canvas holding the ui is in screen space - overlay mode, and all the different slots are images with a button component that switches two sprites, however when i play there seems to be an offset from where my mouse is to which slot actually gets highlighted. The only answer i’ve seen haven’t helped as they were either for a world space canvas or for other specific situations, and in the tutorials i’m following no one seems to be having this problem.
Can someone explain what the cause of this could be? Thank you.

This is a very old question, but here is a possible answer in case anyone else gets stuck with this. The button component also detects children of the button object, so if you have a text object that’s scaling is larger than the button, the button will detect the cursor even if it’s only above the text object, not the button.