[Dynamo] Fix bug when dynamo generate guards for enum type (#98652)
Fixes Meta internal user case, actually I think this is a ```enum``` bug, we provide workaround in dynamo.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98652
Approved by: https://github.com/jansel