Rows in tables CE_ACTIVITY and CE_QUEUE and all their child tables are not deleted when long-lived branches, short-lived branches and PRs are deleted.
The reason is the following:
1. data from these tables is deleted based on the component uuid to which tasks are associated with
2. For branch and PRs, the value of the component uuid is the uuid of the project (master branch), not the UUID of the branch/PR
For the record, association between a task and a branch/PR is stored in table CE_TASK_CHARACTERISTICS.