From memory, it has something to do with the build grid and where the player is standing is not blocked by the barrier… I have a few guesses, hindered by editor tyed up so I cant look at it
Theres a setting shrink barrier to allow building, if the barrier is too thin, the shrink allows the builds past
or
If your hollow box barrier is on grid say 512x512, the barriers wall position is on the grid, but player builds have a default 32 units distance from the grid for the build to get attached… so bring the barrier walls inside the grid more than 32 units, so the build can’t attach past it