Every task in a lobby or room has a small list icon - the same icon as the Tasks tab in the top bar. An outline icon means the task lives in this session only. Tap it and it turns solid: the same task is now in My tasks too, and it will still be there after the session ends. Tap again to undo.
A task you pulled in from My tasks already shows the solid icon, quietly. Tapping it does nothing and never deletes anything; the ✕ on that row only takes it out of this session - it stays on your Tasks page.
The recap gives you one last chance: it lists the session tasks you did not finish, each with a Keep in My tasks button, plus Keep all. Nothing asks you to decide - if you just leave, session tasks stay in that session's history and that is fine.