Well, that would be a fix specifically for your mod and I try to avoid that, I will try to find a solution for all mods that implement specific layout logics for social policies.
In general I'd agree with you, that you shouldn't have to make that kind of exception. And if I had a better handle on using the ContextPtr tools, it might be possible to structure my branch to better mesh with others. But failing that, there's just not a whole lot you can do; the SE box contains 10 policies, which a normal branch box can't hold, and they don't have pipes or an Adopt button. So the standard logic would just break badly.
Now, back in ye olden days, I'd put the ten SE policies inside the ten existing branches' boxes. If need be you could go back to that, but that adds a host of other problems.
Also, I want to correct one thing you posted earlier:
On a side note, you also defined an "invisible" social policy with negative values for gridX and gridY while 0 would have been fine since it already means the SP must not be displayed.
This isn't actually true. The vanilla game doesn't treat a 0 value as an intrinsic "do not plot" flag. What happens is that it tries to put a box at the location corresponding to (0,0), and then it trims along the box's boundaries. Since y=0 puts it well outside the top edge of a normal box, it's automatically clipped out, and you don't see it.
But my Social Engineering branch uses a different spacing, with greater X spacing and less Y spacing. This means that y=0 and x=0 are NOT outside the boundaries any more. To demonstrate, below I've attached an image showing the "invisible" policy placed at GridX=0, GridY=0. You can see it there, off to the left. That's why I put it at -1,-1 instead of 0,0; that's what it took to make it truly invisible.
Now, it'd be easy enough to change the code so that it WOULD treat 0 as a "do not plot" flag. But since I don't want to insist on that change for my players (since they might be using my mod with one that uses those values for legitimate items), I had to put the values at -1.