Prevent Building Through Static Mesh

Hello! To save space in my world I am using a static mesh for the walls.

Unfortunately, They player can build though the mesh.

Does anyone have any idea how to allow the player to build on the mesh BUT not through it?