My best guess would be that your iCloud is out of sync on those occasions.
Let’s say your last “global” update that has synced across devices is A. Next on your Mac, you update B, and this is synced up to the cloud (A-B).
Now on your iPhone, you run the automation to make update C, only update B has not yet found its way down to the iPhone. Normally it would have, but for some reason (connectivity, background process utilisation, etc.) this time, it has not. This latest, out of step update is then synced up to the cloud (A-C).
At this point, iCloud is perhaps able to get a bit clever and note from sync timestamps/positions that there is in effect a potential conflict. Rather than overwriting (A-B with A-C), it places two copies in the directory (A-B & A-C), with a sequence number, so that you can manually resolve it.
As I say, this is just a guess. Without some examples, timings, and precise sequences it is hard to tell if this is a viable explanation for your particular observations, or just a viable explanation for the more general observations described.