BUG: Fix some cases of groupby(...).transform with dropna=True
Part of #17093

- [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.

Plan to expand the whatsnew note as more parts of #45839 are merged.

Ran groupby ASVs; `groupby.Nth.time_frame_nth` showed a performance decrease, then increase, then twice not significantly changed. No other ASVs had significant changes.
Thanks @jbrockmendel - changes made and green (so far, at least) thanks @rhshadrach very nice!