Revert "Improve dynamo support for autograd.Function (#98158)"
This reverts commit 4716fa24115435fa87d04213382d757816b8f1f3.
Reverted https://github.com/pytorch/pytorch/pull/98158 on behalf of https://github.com/huydhn due to Sorry for reverting your PR, but it seems to breaks MacOS trunk job https://hud.pytorch.org/pytorch/pytorch/commit/4716fa24115435fa87d04213382d757816b8f1f3. The signal was missing from the PR because we disabled MacOS job yesterday due to https://github.com/pytorch/pytorch/issues/98362