Hello,
When a process run on multiple rows and there is a step that calls a script with returned values, the processes get confused and mix the returned values from the script call. It looks like a race condition but, no matter what, it is just a bug if a process works for a single row but not for 2 or more.
The workaround is to add a wait step (minimum is 5min) just after the script call. However, it is just weird and the script integration should be fixed.