Feature scaling affects decision tree predictions (it shouldn't affect according to the theory)

### Describe the bug

[data.csv](https://github.com/scikit-learn/scikit-learn/files/10513429/data.csv)
Here is the dataset example with one feature and one target.
According to the dacision tree algorithm decision tree is not sencible to feature scaling, so predictions should be the same for initial and scled features.
In the code below I loaded data, splited in train-validation datasets, applied min-max scaling. Then I built decision trees and calculated predictions for initial validation dataset anf dataset with scaled features. Most of predictions of two models for validation datasets are equal, but trere are two predictions (of 20 validation examples), that differs. 
I've obtained similar situation for a number of models, so I think there is a bug in decision tree algorithm realization.

### Steps/Code to Reproduce

```python
import pandas as pd
import numpy as np

from sklearn.preprocessing import MinMaxScaler

from sklearn.metrics import mean_squared_error
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor


df = pd.read_csv('data.csv', header=0, sep=',')

# splitting into train - val datasets
df_train, df_val = train_test_split(df, test_size=0.2, random_state=42)

# create dataframes for feature variables

df_train = df_train.reset_index(drop=True)
df_val = df_val.reset_index(drop=True)

# create dataframes for target variables

dy_train = df_train.proof_stress_mpa
dy_val = df_val.proof_stress_mpa

df_train.drop('proof_stress_mpa', axis=1, inplace=True)
df_val.drop('proof_stress_mpa', axis=1, inplace=True)

#scaling train features
min_max_scaler = MinMaxScaler()
my_features = min_max_scaler.fit_transform(df_train).reshape(-1, 1)
x = pd.DataFrame(my_features, columns = ['tensile_strength_mpa'])

#scaling validation features
my_features = min_max_scaler.transform(df_val).reshape(-1, 1)
x_val = pd.DataFrame(my_features, columns = ['tensile_strength_mpa'])

# decision tree prediction for unscaled data
dt1 = DecisionTreeRegressor(random_state=42)
dt1.fit(df_train, dy_train)
unscaled_prediction = dt1.predict(df_val)

#decisioon tree prediction for scaled data
from sklearn.tree import DecisionTreeRegressor
dt2 = DecisionTreeRegressor(random_state=42)
dt2.fit(x, dy_train)
scaled_prediction = dt2.predict(x_val)

print(unscaled_prediction==scaled_prediction)
```
### Expected Results

```
[ True  True  True  True  True  True  True  True  True  True  True  True
  True  True True True  True  True  True  True]
```

### Actual Results

```
[ True  True  True  True  True  True  True  True  True  True  True  True
  True  True False False  True  True  True  True]
```

### Versions

```shell
System:
    python: 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
executable: C:\Users\alena\.virtualenvs\scaling_methods-_jbypfFI\Scripts\python.exe
   machine: Windows-10-10.0.19044-SP0

Python dependencies:
      sklearn: 1.2.1
          pip: 22.3.1
   setuptools: 66.1.1
        numpy: 1.24.1
        scipy: 1.10.0
       Cython: None
       pandas: 1.5.3
   matplotlib: 3.6.3
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: C:\Users\alena\.virtualenvs\scaling_methods-_jbypfFI\Lib\site-packages\numpy\.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
        version: 0.3.21
threading_layer: pthreads
   architecture: Zen
    num_threads: 6

       user_api: openmp
   internal_api: openmp
         prefix: vcomp
       filepath: C:\Users\alena\.virtualenvs\scaling_methods-_jbypfFI\Lib\site-packages\sklearn\.libs\vcomp140.dll
        version: None
    num_threads: 6

       user_api: blas
   internal_api: openblas
         prefix: libopenblas
       filepath: C:\Users\alena\.virtualenvs\scaling_methods-_jbypfFI\Lib\site-packages\scipy.libs\libopenblas-802f9ed1179cb9c9b03d67ff79f48187.dll
        version: 0.3.18
threading_layer: pthreads
   architecture: Zen
    num_threads: 6
1
​
```

COMMENT:
So I quickly check the underlying trees. You can use `sklearn.tree.plot_tree` and you will see that the two trees are exactly the same. To ensure that, you can check that the value predicted at each leaves is the same:

```python
In [26]: for node_id in range(dt1.tree_.node_count):
    ...:     if dt1.tree_.children_left[node_id] == -1:
    ...:         assert (dt1.tree_.value[node_id][[0]] - dt2.tree_.value[node_id][[0]]) < 1e-10
```

I would therefore assume that we have some floating point rounding due to the scaling that make the sample be regressed differently.

So if we look at the specific sample that is problematic, we can use `apply` to check the leave where it end-up in both case:

```
In [31]: dt2.apply(x_val)
Out[31]: 
array([115, 115,  69,  99, 116,  16,  93,  98,  97, 120,  28, 122,  93,
       122,  97, 120,  55,  37,  77, 104])

In [32]: dt1.apply(df_val)
Out[32]: 
array([115, 115,  69,  99, 116,  16,  93,  98,  97, 120,  28, 122,  93,
       122,  95, 117,  55,  37,  77, 104])

In [33]: dt1.tree_.value[95]
Out[33]: array([[287.]])

In [34]: dt1.tree_.value[97]
Out[34]: array([[306.]])
```

So looking back at the tree structure we have the following decision for the unscale and scale case:


![image](https://user-images.githubusercontent.com/7454015/215071079-7ef91069-566a-4e2f-b74c-79d7df542556.png)

![image](https://user-images.githubusercontent.com/7454015/215071530-130c570b-6df3-40c6-a4fe-6a8b7ebe071f.png)

The value in X is: `462` and when scaled `0.882550`. In the unscale case this is exactly the threshold and will be dispatch and the left leaf while the scaling introduce so numerical rounding and dispatch the sample on the right leaf.

At the end this is where theory and implementation details diverge but "it is life" :)

Hope it convinces you that everything is fine.

Closing.

Labels: Bug, Needs Triage