Okay, I tried your macro (on a Mac Mini.) I can confirm that it does move the window from the secondary (iPad) monitor to the Main (4K) monitor. I'll have to believe you that it behaved differently in earlier macOS versions. There is no mention of monitor behaviour on the KM wiki page for this action....
My first theory was that the coordinates for this action are based on the overall combined coordinates of all screens. But when I moved my secondary window to the left of my Main window, I was able to disprove that idea. I don't have very much experience with moving windows across displays using KM.
So now I'm leaning on the idea that this KM action has undergone an unexpected change, @peternlewis ? ... I bow in humility before KM's creator because I'm rarely right when I make a claim like this.
The coordinates are based on the top left corner fo the main screen, which is the screen with the menu bar in it in the System Preferences display arrangements.
The resizing is done with accessibility APIs, and they do not generally like the window to be resized off the screen, so ensure your size is smaller than the screen it is resizing on. The action has to be done by setting the position and the size independently, and if either results in the window going off the screen, then the system may ignore the change. So Keyboard Maestro applies both changes twice.
It is possible Monterey handles these things differently.
If the original poster is correct about previous macOS behaviour, then I think it's correct to say that Monterey has changed something, because even when I'm trying to relocate a small window within the size constraints of a secondary monitor, it always moves it to the main monitor now.
If your macros are running on multiple monitors and Monterey has changed it's behaviour resulting in KM changing its behaviour, then I think you may be forced to rewrite some of your affected macros. There're more than one way to change your approach: (since none of these methods involve repositioning the window, they won't move your window to a different screen)
use KM's menu click action in apps rather than click with the mouse
Use relative points within the front window to click the mouse
use relative points, relative to an image on the front window
use AppleScript to press buttons in apps rather than click with the mouse
Ta Da...... I discovered this morning that if I have the move to horizontal coordinate be a negative number it will position it correctly on the extended display.
I just had to play around to get the correct number. I think I got its
Thanks to Sleepy and Peter for their help. I hope this information will help others.