BUG: DataFrame.apply parameters raise a TypeError when the function is called after a groupby
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [x] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

```python
# Your code here
>>> df = pd.DataFrame([[4, 9]]* 3 + [[3, 8]] * 2, columns=['A', 'B'])
>>> df.groupby('A').apply(max)            
   A  B
A
3  3  8
4  4  9

>>> df.groupby('A').apply(max, raw=True)
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1253, in apply
    result = self._python_apply_general(f, self._selected_obj)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1287, in _python_apply_general
    keys, values, mutated = self.grouper.apply(f, data, self.axis)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\ops.py", line 783, in apply   
    result_values, mutated = splitter.fast_apply(f, sdata, group_keys)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\ops.py", line 1328, in fast_apply
    return libreduction.apply_frame_axis0(sdata, f, names, starts, ends)
  File "pandas\_libs\reduction.pyx", line 381, in pandas._libs.reduction.apply_frame_axis0
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1237, in f  
    return func(g, *args, **kwargs)
  File "<__array_function__ internals>", line 4, in amax
TypeError: _amax_dispatcher() got an unexpected keyword argument 'raw'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1264, in apply
    return self._python_apply_general(f, self._selected_obj)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1287, in _python_apply_general
    keys, values, mutated = self.grouper.apply(f, data, self.axis)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\ops.py", line 783, in apply   
    result_values, mutated = splitter.fast_apply(f, sdata, group_keys)
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\ops.py", line 1328, in fast_apply
    return libreduction.apply_frame_axis0(sdata, f, names, starts, ends)
  File "pandas\_libs\reduction.pyx", line 381, in pandas._libs.reduction.apply_frame_axis0
  File "C:\Program Files\Python39\lib\site-packages\pandas\core\groupby\groupby.py", line 1237, in f  
    return func(g, *args, **kwargs)
  File "<__array_function__ internals>", line 4, in amax
TypeError: _amax_dispatcher() got an unexpected keyword argument 'raw'
```

#### Problem description
When calling apply after a groupby and using additional parameters such as "raw", or "result_type" it raises a 
```TypeError: _amax_dispatcher() got an unexpected keyword argument 'raw'``` as if the parameter was passed to "func" instead of being passed to ```apply```. When used without a groupby or with a groupby and without any additional parameter, it works fine. A similar issue has been raised in SOF https://stackoverflow.com/questions/39125895/how-to-use-keyword-raw-in-apply-to-a-groupby-object but the answers do not really help soliving the problem.

#### Expected Output

#### Output of ``pd.show_versions()``

<details>

pandas           : 1.3.0
numpy            : 1.21.1
pytz             : 2021.1
dateutil         : 2.8.1
pip              : 21.1.3
setuptools       : 56.0.0
Cython           : None
pytest           : None
hypothesis       : None
sphinx           : 4.0.2
blosc            : None
feather          : None
xlsxwriter       : None
lxml.etree       : 4.6.3
html5lib         : 1.1
pymysql          : None
psycopg2         : None
jinja2           : 3.0.1
IPython          : 7.24.1
pandas_datareader: None
bs4              : None
bottleneck       : None
fsspec           : None
fastparquet      : None
gcsfs            : None
matplotlib       : 3.4.2
numexpr          : None
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : 4.0.1
pyxlsb           : None
s3fs             : None
scipy            : 1.7.0
sqlalchemy       : None
tables           : None
tabulate         : None
xarray           : None
xlrd             : None
xlwt             : None
numba            : 0.53.1
</details>
