[Reland][Dynamo] VariableTracker.recursively_contains should be updated correctly when mutation happens (#103564) (#103717)
Summary: Reland of https://github.com/pytorch/pytorch/pull/103564
Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/5c3556da9406f814e6a1286cb6762e5508d54971
Differential Revision: D46783727
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103717
Approved by: https://github.com/angelayi