Okay, let me outline my solution with some screenshots. I'm unable to test my solution until I connect another monitor. If you want, you can create this macro yourself and try to test/debug it. Normally I do all the testing and debugging, but without a second monitor I can't do that.
The first thing is to trigger the macro whenever a window moves. You do that like this:
This will trigger the macro dozens of times while you are moving it, so the first trick is to add a semaphore to the top of the macro with a short timeout, probably a third of a second. Technically this does NOT get the last known position of the window, instead it gets roughly the Nth last position (eg, third last), but that's good enough because the window moves so often and triggers this macro so often that the third last position will be on the destination window about 99% of the time. I admit this is a bit of a hack, but I think it will work fine.
The next trick is to pause the macro, which locks the semaphore for a short period of time, like this. I'm not 100% certain if this is necessary, but it helped me debug it. Once the macro works, I'll test removing this action.

For the next trick we will refer to a dictionary that we will store the last known display number of any window of a particular name. The dictionary can be called anything, but I'm calling it EachWindowScreen, because it contains the screen index number of each window, using the window name as the key. Bear in mind that if your window names change, it will "forget" the screen index for that window. I don't know if your window names are steady or volatile because you didn't say which apps you are doing this with.

In the above action, the first thing this macro does is test if the "EachWindowScreen" dictionary is storing a "last known screen number" for the current window. If it does not, it saves the current screen number for the current window using the name of the current window as the key.
But if it DOES have a memory of the "last known screen number" then it check if the current screen number for the front window is different from the "last known screen number" for the window. If the values are the same, it does nothing. (Because it can't detect a change until it has detected the window at least once.) But if the values are different, it uses the KM "Move and Resize Window" action to resize the window to 75%. I coloured that action red because I stopped at that point, since I don't currently have a second monitor to test. So that final action may need some modification before it works.
So that's it... under ten actions. There might be some people on this forum who can spot better ways to tackle this problem. I'm open to suggestion. Since you have two displays, you could create this macro, see if you can get it to work, and come back here for help if it doesn't work.