Script on near identical mac won't loop properly

Thanks for posting your Macro image. A quick scan of it immediately shows one potential issue to me: Almost all of your Pause Actions are toooooooo long. You have them set to 1 sec or more. For simple stuff, like Typing a Keystroke TAB, usually 0.1 is more than enough.

For the sections where you open a new web page, then do a long pause, you might try using this technique: MACRO: Pause Until Web Page Element Exists [Example]

I don't know if these many long pauses are contributing to your looping issue, but they might. IAC, you will be much happier with a quicker Macro.

A development technique I sometimes use when I don't know how long of a pause I need is to initial put in a lengthy pause (maybe 1 sec), to test and develop the Macro. Once it is working, then reduce the Pauses as much as you can. You can use a KM variable in the Pause action, and set the variable at the top of your macro. This makes it easy to change all of the Pauses later.

image
(Ignore the red "invalid". It is there just because the KM Local variable is not yet defined).

When I get more time, I'll take a closer look at your Macro.