That's every survival game ever if you play on a PVP server. It becomes a game of building your base in such a way that it is either so annoying to raid or takes tremendous amounts of resources to break into that no one bothers.
yeah. I mean this is a long time issue with in any pvp mmo that has houses, etc. As stated, I have never actually played any of these, so can't really say what each game has done to combat the issue.
I would say, some basic things I would do to help the issue. The problem is generally game world vs real world. The real world is huge, and every object in it is natural. Just raw distance alone, is a huge factor in keeping your shit safe. you have a camp in the woods, that camp will be hard to find just due to innate size of the world, and tree coverage. in games, that is not true. worlds are small, and objects IN the world are conspicuous. Also, homesteads in the real world have the advantage of the fact, you are most likely living in it 90% of the time, and there to defend it. Time in video games is compressed. and, you are likely only actually around your homestead to defend it in a game for 15minutes out of 24 hours..
1. secret stashes. This would be most basic and simple thing to incorporate to help deal with raids. A stash would be hidden in a game object. either, tagged to a natural object in the world, or perhaps outright placed by you. Visually you get a UI element, but other players do not. you see your secret stash tree, you see the interact UI. Another player, just sees a tree. (until they try cutting it down.) ideally this would be tress, stumps, rocks, as well as walls/floors. Upgrades would be trapdoors and buried lockboxes, for larger sized hordes.
These should not be un-accessible, just undetectable. So, either a player through dumb luck trying to harvest the right tree with find it. or, perhaps an actual search function in game, with a large time associated with it. like, searching a tree would take 1minute of real time or something. as noted, the large time required would reduce casual raids greatly.
2. NPC guards. having npc guards is always a bit of a give and take in a pvp game. But I think you have to have them. As noted, real world you are in your homestead to defend it 90% of the time or more. you have kids, husband or wife also defending, and very likely even ranchhands,etc. In games, when you are offline, your house is a ghosttown, way too easy for picking. you HAVE to have some kind of active defense. So, NPC guards which would be overtuned. 1 npc guard should wreck an average player. making avoidance, stealth primary.
Pets would be great for this as well.
3. Broken objects are just broken, not destroyed. Then decay at some rate to eventual destruction. Basically, if you tear down someones wall. the wall is still there, and can be repaired cheaply, and easily.