That won't be the issue unless the cursor position changes the image being searched for itself. Post your macro and an example of the kind of image you're dealing with.
Is that true? In my experience, the mouse pointer doesn't interfere with found images or appear in screenshots. I just tested now by searching for a small found image while visibly obscured by the pointer, and it was found without issue. I also took a screenshot and the pointer was invisible.
This is interesting because I would expect your mental model, but I was noticing Chris' mental model.
Also, I am sure if what Chris and I were experiencing was indeed the case, @peternlewis will change the keyboard maestro behavior. I think I am doing something wrong.
As far as I know, Peter can't change what macOS screen recording can "see".
Have you tried the experiments I carried out? Take a screenshot. Can you see the cursor?
Just because your image search isn't working, it doesn't mean it's because the cursor is interfering; based on what I've seen, I'd say it likely isn't.
Post your macro and an example of the kind of image you're searching for. There may be another point of failure.
And if you do want the pointer included you can shell out and use screencapture with the -C flag, passing variables if you want a window ID or a fixed rectangle.
As @noisneil pointed out, it is probably not the pointer but the image changing because of the pointer being on it -- like web page image buttons that change colour when you hover over them. Depending on how they behave you can put the pointer to a known "safe" place first, you can capture and test all known button states, or do something else more specific to the problem.