They used to prevent invasions. However I'm surely sure I saw someone as this same question in the discord channel and one of the devs responded saying this was an intentional change.
If true, I don't think this is a good idea, however saying that the whole invasion mechanic is currently in flux so maybe this decision will make sense when they system is implemented.