Attacks during online

I often recognize that i lose or win some trophies during i’m online. 

So the problem i face is, can someone attack me when i’m changing my dungeon? so he can rush through when i’m building a new path`?

Timmey