Thank you for the question.
I seem to remember having heard about this before, so I searched The Building Coder existing blog posts:
Unfortunately, I did not find any note of this observation of yours there.
However, please keep in mind that the question and answer to why? is of very limited use.
If you observe this behaviour, then it is a fact. If it is a fact, you and your add-in need to deal with it. If you deal with it, who cares why it happens? Ours is not to winder why, ours is but to do or die...
If you would like me to report this to the development team, discuss with them, possibly analyse the causes, maybe even rectify this behaviour, please provide a minimal reproducible case:
https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b
Thank you.
However, to make more effective and immediate progress, I would suggest including graceful handling of this possible behaviour in your algorithm.