Ignoring the staircase with the white mesh, you can see that on the left most side the white box looking is clipping in with the big box looking. While on the middle its just the big box looking alone.
Heres one where I get my desired result where it works as Ide want it to.
im not running a loop on it, before the branch node is a sequence node. since its a function i think something loops somewhere down the line, maybe that might be the issue. Ill check it out soon
This may sound dumb now ill be honest hahaha but I found the issue, I was calling the function twice after all. Lets just say I called the function shown above within another function, then doing it again outside said function. The loop idea was an eye opener it was a big help, Thank you