You just need to put all the tracks of the moving object in a separate group, and set this group as "mobile".
Notice that this works for rigid-moving object. Else you'll need to do motion capture.
You should use mask only if you want to auto-track the moving object: if the mask is checked as "group", all the tracks that falls within it while auto-tracking will be set in a separate mobile group.