Automatically unassign certain UserTaks on assignement

You have the “mark” your tasks that are in the group of user tasks somehow… so you need to pick a marking scheme; If you mark your tasks with something like extensions, then you will need to parse the BPMN xml each time.

as a simple solution, how about you make it so if a user is claimed/assigned to Task A, and they try and claim task B, it will stop them. and they have to unclaim task A before they can claim Task B. This way your “duration” will be clean and you can use the Claim duration as a ~actual work duration.

Take a look at Limit number of concurrently running instances of a process definition - #9 by wke-rec which limits starting a process instance. You can use the same logic on a Task Listener for assignment to ensure that only 1 of the tasks is currently claimed.
Again you need to choose how you want to “group” your tasks together. Easiest way is with the Task IDs. Harder way is with “Extension” values, that will require you to parse the BPMN xml: Get Extension Properties - Helper Script