Fits itself to the floating row it sits in — its nearest positioned ancestor. When the full row is wider than that row's content box (less EDGE_ROOM), Duplicate is dropped from the pill so Done stays on screen. The check re-runs whenever that row or the full row resizes (rotation, drawer resize, a longer translation).
The workout builder's multi-select action pill: Delete, Duplicate, Group, Edit, Tag (as available) and Done.