Fix Bug: last column missing formatting in Latex (#52218)
Redo of #60239 but using a feature branch this time :-)

- [x] closes #52218 
- [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).
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Ok I looked a little more at this. The original problem was phrased as not applying to the last column for a styling function that should apply to the whole row. **However** that isn't really the nature of the problem.

E.g.
<img width="469" alt="Screenshot 2024-11-19 at 20 36 18" src="https://github.com/user-attachments/assets/77524391-e155-4cd6-b0fc-7c1e30deec12">

Notice that Latex translate seems to get out of line for hidden columns. > Ok I looked a little more at this. The original problem was phrased as not applying to the last column for a styling function that should apply to the whole row. **However** that isn't really the nature of the problem.
> ....

Ah interesting... that makes sense. Thanks @corbanvilla 