How do I fix this so that the connecting part doesn't overlap or leave gaps in between?
The object consists only of edges, and the problem occurs when more than 2 vertices are connected.
This is how it looks when Geometry Nodes are applied.
The right bar is what I'm aiming for. As you can see, the edges are aligned with the cube in the corner: