The yellow part of the logic gate doesn't have collision detection when placing the gate, so you can place it over anything. Open logic gates also don't have collision where the yellow part would have been, so you can place things overlapping that.