Why does Zendesk Chat update the assignee or group of a recently ended chat?
When a Chat ends, the integration adds a comment update to the ticket with the string Chat ended. Right after that, the integration applies a
zopim_chat_ended tag and updates the ticket to ensure the agent who served the chat is assigned the ticket in their default group.
Since this is expected behavior, we encourage agents to wait until the
zopim_chat_ended tag appears on a ticket to change the group or assignee. If a trigger is being used to make these changes, the trigger should include criteria for that tag.
If this behaviour doesn't suit your needs, you may want to consider switching to the Zendesk Agent Workspaces.