For the record, I have been experiencing a similar problem in various apps since upgrading to KM11. While the problem is not as neatly reproducible as this one (which I can reproduce as well), it occurs most often in Microsoft Word. After Word has been running for a while (TBD), it starts acting up when it comes to moving and resizing windows with KM macros. As is the case here, it takes several successive triggers of the same macro to eventually get the window to the desired position and size. The same thing also happens in Safari after Safari has been running for a while. And I've seen this problem at least once in Nisus Writer Pro as well.
Interestingly, I do remember seeing this problem ONCE in a version of KM prior to KM11. But it was an one-off and I chalked it up to some kind of glitch. Now I realize it was a rare occurrence of a long-standing problem, which unfortunately has come to the fore with KM11. (I started having the problem with early betas of KM11 in Ventura. Reverting to KM10 would eliminate it.)
I have been in touch with Peter about this. It's good that he now has a reproducible scenario! Hopefully it's the same underlying cause (probably a bug in macOS's Accessibility API) and he can figure out something to do about it, either by undoing whatever has changed between KM10 and KM11 or by finding some other kind of workaround.
In the meantime, for MY problem, I have found that replacing the single Move and Resize action with two SEPARATE actions, Move first and then Resize, with a pause of 0.5 s between the two, helps quite a bit. It does not COMPLETELY fix the problem (once it start occurring, after the window's parent app has been running for a while), but it moves the window to the right horizontal position and it resizes it to the right height and width after a single trigger. But the vertical position is still wrong (it stays at the very top of the screen), although ONLY when I try to move the window from my main display (with the menu bar) to one of my side displays (with no menu bar). In those cases, I have to trigger the macro a second time to get the window to move to the right vertical position. So it's better than having to trigger the macro 3 times every time, but it's not perfect either.
For the record, with your particular scenario (macro to maximize in Safari), the magic number is three times on my Mac too, with Sonoma 14.1, KM11.0.1 and Safari 17.1. (I have a 6K display.)
Sadly, my workaround with the split actions and the pause in between doesn't seem to work for your problem. The move works right, but the resize doesn't, no matter how long the pause is. Sorry!