StackingRegressor.fit() doesn't support sample_weight when using Pipeline objects as estimators

### Describe the bug

sklearn 1.5.0. When using a Stacking model, fitting raises the following error when:
- `sample_weight` argument is passed, AND
- the individual estimators contain a Pipeline object instead of a single estimator

I think the actual problem lies in `_BaseStacking.fit()` in line 210. There is just `sample_weight` used as a fit parameter. Instead it should check whether each single estimator is a Pipeline and then transforming the attribute name `sample_weight` to i.e. `linearregression__sample_weight`, depending on the last step of the pipeline.

### Steps/Code to Reproduce

``` 
import numpy as np

from sklearn.ensemble import StackingRegressor, GradientBoostingRegressor
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import RobustScaler
from sklearn.pipeline import Pipeline, make_pipeline

X = np.array([[4, 5], [1, 4], [9, 5], [7, 4]])
Y = np.array([8, 4, 12, 10])
W = np.array([1, 2, 3, 4])

mdl_a = Pipeline([("scl", RobustScaler()), ("lr", LinearRegression())])
mdl_b = GradientBoostingRegressor()

stack = StackingRegressor([("a", mdl_a), ("b", mdl_b)])
stack.fit(X, Y, sample_weight=W)
```

### Expected Results

Should fit the model instead of raising an error

### Actual Results

```
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
c:\Users\pfa2ba\Documents\dhpt\dhpt_models.py in <module>
     14 
     15 stack = StackingRegressor([("a", mdl_a), ("b", mdl_b)], cv=2)
---> 16 stack.fit(X, Y, sample_weight=W)

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\ensemble\_stacking.py in fit(self, X, y, sample_weight)
    969         _raise_for_unsupported_routing(self, "fit", sample_weight=sample_weight)
    970         y = column_or_1d(y, warn=True)
--> 971         return super().fit(X, y, sample_weight)
    972 
    973     def transform(self, X):

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\base.py in wrapper(estimator, *args, **kwargs)
   1471                 )
   1472             ):
-> 1473                 return fit_method(estimator, *args, **kwargs)
   1474 
   1475         return wrapper

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\ensemble\_stacking.py in fit(self, X, y, sample_weight)
    222             # base estimators will be used in transform, predict, and
    223             # predict_proba. They are exposed publicly.
--> 224             self.estimators_ = Parallel(n_jobs=self.n_jobs)(
    225                 delayed(_fit_single_estimator)(clone(est), X, y, fit_params)
    226                 for est in all_estimators

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\utils\parallel.py in __call__(self, iterable)
     65             for delayed_func, args, kwargs in iterable
     66         )
---> 67         return super().__call__(iterable_with_config)
     68 
     69 

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\joblib\parallel.py in __call__(self, iterable)
   1916             output = self._get_sequential_output(iterable)
   1917             next(output)
-> 1918             return output if self.return_generator else list(output)
   1919 
   1920         # Let's create an ID that uniquely identifies the current call. If the

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\joblib\parallel.py in _get_sequential_output(self, iterable)
   1845                 self.n_dispatched_batches += 1
   1846                 self.n_dispatched_tasks += 1
-> 1847                 res = func(*args, **kwargs)
   1848                 self.n_completed_tasks += 1
   1849                 self.print_progress()

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\utils\parallel.py in __call__(self, *args, **kwargs)
    127             config = {}
    128         with config_context(**config):
--> 129             return self.function(*args, **kwargs)

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\ensemble\_base.py in _fit_single_estimator(estimator, X, y, fit_params, message_clsname, message)
     27         try:
     28             with _print_elapsed_time(message_clsname, message):
---> 29                 estimator.fit(X, y, sample_weight=fit_params["sample_weight"])
     30         except TypeError as exc:
     31             if "unexpected keyword argument 'sample_weight'" in str(exc):

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\base.py in wrapper(estimator, *args, **kwargs)
   1471                 )
   1472             ):
-> 1473                 return fit_method(estimator, *args, **kwargs)
   1474 
   1475         return wrapper

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\pipeline.py in fit(self, X, y, **params)
    469             Pipeline with fitted steps.
    470         """
--> 471         routed_params = self._check_method_params(method="fit", props=params)
    472         Xt = self._fit(X, y, routed_params)
    473         with _print_elapsed_time("Pipeline", self._log_message(len(self.steps) - 1)):

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\pipeline.py in _check_method_params(self, method, props, **kwargs)
    367             for pname, pval in props.items():
    368                 if "__" not in pname:
--> 369                     raise ValueError(
    370                         "Pipeline.fit does not accept the {} parameter. "
    371                         "You can pass parameters to specific steps of your "

ValueError: Pipeline.fit does not accept the sample_weight parameter. You can pass parameters to specific steps of your pipeline using the stepname__parameter format, e.g. `Pipeline.fit(X, y, logisticregression__sample_weight=sample_weight)`.
```

### Versions

```shell
System:
    python: 3.9.15 (main, Nov 24 2022, 14:39:17) [MSC v.1916 64 bit (AMD64)]
executable: c:\Users\pfa2ba\.conda\envs\dhpt\python.exe
   machine: Windows-10-10.0.19045-SP0

Python dependencies:
      sklearn: 1.5.0
          pip: 21.2.4
   setuptools: 61.2.0
        numpy: 1.22.3
        scipy: 1.8.1
       Cython: None
       pandas: 1.4.4
   matplotlib: 3.5.1
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: mkl
    num_threads: 4
         prefix: mkl_rt
       filepath: C:\Users\pfa2ba\.conda\envs\dhpt\Library\bin\mkl_rt.1.dll
        version: 2021.4-Product
threading_layer: intel

       user_api: openmp
   internal_api: openmp
    num_threads: 8
         prefix: vcomp
       filepath: C:\Users\pfa2ba\.conda\envs\dhpt\vcomp140.dll
        version: None

       user_api: openmp
   internal_api: openmp
    num_threads: 8
         prefix: libiomp
       filepath: C:\Users\pfa2ba\.conda\envs\dhpt\Library\bin\libiomp5md.dll
        version: None
```

COMMENT:
I'm closing in favor of finishing the work on metadata routing.

Labels: Bug, Needs Triage