Yes, that happened to me with an Iron Golem.
If I remember right the server registers that you are dead and mobs don’t Aggro onto you. But maybe I just wasn’t close enough.
If you disconnect it registers the ban and even the time since the death, so if you had played for an hour after the glitch occured then it’d be 11 hours.
And it’s worth noting that while (If) mobs don’t aggro onto you you still loose food so it’s still possible to die again, in case anyone wants to exploit this.