NOTICE
I don't have the time/interest to maintain RW mods these days, *but* 竹子 has updated this to 1.5, go grab the new version there: https://steamcommunity.com/sharedfiles/filedetails/?id=3280860603 (huzzah!)
Everyone knows MinifyEverything. Everyone loves MinifyEverything. Even Raiders, because it makes it possible for them to just walk up to your defensive perimeter and help themselves to a nice chunk of wall. Or many other things that, while you like being able to move around when it's convenient, don't really make sense as something that a naked guy with a crossbow would likely be able to carry away in the middle of a firefight.
That's where "Don't Steal My Walls!" comes in. It lets you modify the behavior of Raider thieving so that they will ignore certain types of objects that they would otherwise be able to snag. Exactly what objects can and cannot be stolen can be modified in Settings; by default, doors and walls are not allowed.
Requirements
Harmony: https://github.com/pardeike/HarmonyRimWorld
Recommendations
(not required but still super cool)
MinifyEverything: https://github.com/erdelf/MinifyEverything
Again as mentioned at the top, I'm no longer maintaining this mod, but 竹子 has updated this to 1.5: https://steamcommunity.com/sharedfiles/filedetails/?id=3280860603