Anmeldung during temporary stay abroad

Hi! I have lived in Zurich since 2018 and am planning a stay abroad lasting for 2 months. I consider moving out of my old apartment before the stay abroad and only move into a new place when I return to Zurich. If I do this I wouldn’t have a valid address in Switzerland for those 2 months. Would I then deregister at my current place when I leave and register at my new place I return, so there will be a 2 month gap in my registration in Switzerland? Would such a gap have any consequences? I am an EU citizen on a permit B.

If I’m not mistaken, if you will continue paying for your apartment, insurance and etc. You can leave for up to 6 months. But if you deregister, this won’t work. Someone will correct me, if this isn’t the case.