BUG: pivot_table with overlapping values
- [x] closes #57876
- [x] closes #61292
- [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.

Should I update the `doc/source/whatsnew/v2.3.0.rst` or `doc/source/whatsnew/v3.0.0.rst` file? @it176131 - update v3.0.0. Also due to an erroneous commit with a large file, we've had to force-push to the main branch recently. You'll need to fix this up by removing the erroneous commit from your history as well. See the unexpected changes and file in the diff - those need to be reverted.

@datapythonista - if we're going to force-push to a contributors branch, I think a comment detailing what's going on would be helpful. @rhshadrach I believe I've reverted the changes as requested. Please lmk if I did it incorrectly.
 Oh, so GitHub added the image we removed to the open PRs? That explains why it was in that PR... @rhshadrach [this check](https://github.com/pandas-dev/pandas/actions/runs/14518139891/job/40732136143?pr=61293) appears to have failed due to a timeout—is there a way to restart it? Thanks @it176131 