StackingRegressor doesn't take estimators created via make_pipeline

### Describe the bug

sklearn 1.5.0. Using the shortcut `make_pipeline` triggers an error while using the explicit `Pipeline` instantiation works (see code example)


### 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])

mdl_a = make_pipeline([RobustScaler(), LinearRegression()])
# mdl_a = Pipeline([("scl", RobustScaler()), ("lr", LinearRegression())])  # <- this works fine
mdl_b = GradientBoostingRegressor()

stack = StackingRegressor([("a", mdl_a), ("b", mdl_b)], cv=2)
stack.fit(X, Y)
```

### 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>
     15 
     16 stack = StackingRegressor([("a", mdl_a), ("b", mdl_b)], cv=2)
---> 17 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)
    199         # all_estimators contains all estimators, the one to be fitted and the
    200         # 'drop' string.
--> 201         names, all_estimators = self._validate_estimators()
    202         self._validate_final_estimator()
    203 

c:\Users\pfa2ba\.conda\envs\dhpt\lib\site-packages\sklearn\ensemble\_base.py in _validate_estimators(self)
    238         for est in estimators:
    239             if est != "drop" and not is_estimator_type(est):
--> 240                 raise ValueError(
    241                     "The estimator {} should be a {}.".format(
    242                         est.__class__.__name__, is_estimator_type.__name__[3:]

ValueError: The estimator Pipeline should be a regressor.
```

### 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:
You syntax is not correct. You should change:

```python
mdl_a = make_pipeline([RobustScaler(), LinearRegression()])
```

to 

```python
mdl_a = make_pipeline(RobustScaler(), LinearRegression())
```

Labels: Bug, Needs Triage