You can see that the two color are completely rendered fine. But the problem start to appear when you take camera angle when two object with outline merge together. The object rendered behind of the front one start to cover the front one with it’s own outline color.
i usually love blueprintue but there are nodes that have no name and it’s a bit more complex than the time i can put. so i haven’t checked it.
my assumption is that the issue is with the part that selects which color to use. somehow it’s not exclusive. since you’re working with numbers it’s quite possible.
in case it helps you here are some materials i’ve made for making outlines, it’s not perfect but maybe it helps you. it’s foss.