Very interesting, as I was testing on an M1 Air.
Putting a pin in this until I get home and in front of my Intel iMac. It might need a point update to match yours, so that's a fun evening ahead ![]()
Meanwhile, here's a couple more data points:
Image data is stored in the action's XML. Screen shotting to file gets me a 144dpi PNG file. Opening that in Preview, changing the resolution to 72 without changing pixel dimensions and doing "Save As..." gets me a 72dpi PNG file. Dropped the 144dpi file into my "Scratch" macro's "Click on image" action's image well, copied the macro's XML, deleted the image from the well then dropped in the 72dpi file and copied the XML. diffing the two XMLs, the only difference was in the modification date -- image data was identical. Implication -- KM knows about pixels, not resolution.
Used ⇧⌘4-Space and ⇧⌃⌘4-Space to screen shot the front window (ensuring the same dimensions) to file (as PNG) and clipboard. Clipboard pasted into image well, XML copied, file into image well, XML copied, XMLs diffed. Only difference was in the macro's modification date. Implication -- method unimportant when dealing with the same image data.
Now I'm the first to admit that a couple of quick tests don't guarantee that the behaviour will be the same each and every time! But if you try similar on your machine, which seems to fail image detection more often than not, you may be able to spot something different.