[dynamo] Fix Autograd Function Classmethod bug (#103175)
Fixes https://github.com/pytorch/pytorch/issues/103139
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103175
Approved by: https://github.com/williamwen42, https://github.com/yanboliang