I'm pretty sure what's happening is simply unfortunate timing. The debuff gets updated roughly every 5 seconds, which either results in it gaining a stack or changing to the other side depending on what you're standing on when the update happens. This often means that your last chance to switch to the waning side happens a few seconds earlier than you think.