I remember when Tsuku first came out, I experienced something similar. I play casters (SCH and RDM primarily) so I (sometimes lazily) stayed in the center of the field. When the moon phase of Tsukuyomi EX started, that meant that I was virtually 50/50 on both sides of the arena. I think this wigged out the code that assigns the initial debuffs, because whenever I was basically dead-center at the start of that phase, I would have to move firmly to one side (my debuff would usually swap and keep stacks, as you're describing) then scoot quickly to the opposite color to get it to register before the 5-stack could wipe me out. Sometimes the server tick was on my side, and it would correct before I died. More often... I'd just curse as I watched Naia crumple to the 5-stack debuff timing out.

Ever since I noticed that, though, I took care to stand just enough left or right to be completely on a single moon color, and I haven't had that issue since.

Which isn't to dismiss this as a bug - but if that also applies to you, it might be a user-end solution so you can still enjoy the content while the actual code bug is (hopefully) fixed.