BUG: Fix bug in pd.eval when UnaryOp in function
- [x] closes #46471
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

I ran into a similar issue, and added it in test. They both produce `AttributeError: 'UnaryOp' object has no attribute 'value'`.
> Could you add a whatsnew not in `1.6.0.rst` (in `Conversion` section)?

Added. Thanks @yuanx749 