Stop Landscape from Showing in Buildings?

How do you stop the landscape from coming up into buildings?
Related: I have a chest placed on my landscape and when you open the chest, the grass from the landscape material pops up from the bottom. How would I prevent that?

Clarification: I am asking about buildings/chests placed at runtime. I know you can paint mask materials onto landscape in the editor. Is there some way to use materials on the landscape in runtime?

i think you will need to use the “flatten” tool to flatten out the landscape, then put your building/chest on the flat spot, and then use other tools to make it look natural