fix multiple-fake-modes bug with compile + subclasses (#118191)
This should fix the "multiple fake modes" errors we've been seeing with both float8 tensor and DTensor.
Haven't added a test yet - will add one before landing.
I also have a separate PR that would have made the error significantly nicer (the bad error resulted from us returning a FakeTensor at runtime): https://github.com/pytorch/pytorch/pull/118644
Pull Request resolved: https://github.com/pytorch/pytorch/pull/118191
Approved by: https://github.com/drisspg
ghstack dependencies: #117667, #117666, #118209