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:
I used the same model with exact same hyperparameters and setting the same random state for a synthetically generated dataset for three scenarios. Firstly, made the tree with unscaled data, then using maxmin scaling and then scaling each input arbitrarily to close to double digits. The tree output was the same for the maxmin scaled and arbitrarily scaled data but different when it comes to the unscaled data. I am enclosing the code used for reference. This issue is not observed when I tried the same approach with other machine learning packages like MATLAB. I am also enclosing the zip file with the jupyter notebook and the output trees for reference.
[test_tree.zip](https://github.com/scikit-learn/scikit-learn/files/10844429/test_tree.zip)

`import pandas as pd
import numpy as np
from sklearn import tree
import dtreeviz `

`dfe  = np.random.exponential(scale=1e-7, size=(100000,1))
mld  = np.random.exponential(scale=1e2, size=(100000,1))
nh4  = np.random.exponential(scale=1e-5, size=(100000,1))
no3  = np.random.exponential(scale=1e-5, size=(100000,1))
po4  = np.random.exponential(scale=1e-5, size=(100000,1))
rsn  = np.random.exponential(scale=1e2, size=(100000,1))
si   = np.random.exponential(scale=1e-4, size=(100000,1))
sos  = np.random.exponential(scale=1e2, size=(100000,1))
tos  = np.random.exponential(scale=1e2, size=(100000,1))
wo5  = np.random.exponential(scale=1e-7, size=(100000,1))
phyc = np.random.exponential(scale=1e-4, size=(100000,1))`

`columns=['dfe', 'mld', 'nh4', 'no3', 'po4', 'rsn','si',
            'sos', 'tos', 'wo5','phyc']
arr = np.concatenate((dfe,mld,nh4,no3,po4,rsn,si,sos,tos,wo5,phyc), axis=1)
da = pd.DataFrame(arr, columns=columns)
df = da.copy(deep=True)`

`from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error`

`X = df.drop('phyc', axis=1)
y = df['phyc']
X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=0.1,random_state=101,shuffle=False)`
`import graphviz
from sklearn.tree import DecisionTreeRegressor
model = DecisionTreeRegressor(
    criterion='squared_error',
    splitter='best',
    min_samples_leaf=5,
    max_depth=5,
    # min_samples_split=2,
    random_state=101
    )`

#Unscaled Tree

`unscaled_tree=model.fit(X_train,y_train)
y_pred = unscaled_tree.predict(X_test)
rmse_unscaled = mean_squared_error(y_test,y_pred, squared=False)
print('rmse :',rmse_unscaled)
print(rmse_unscaled /df['phyc'].std())`
`from sklearn.tree import export_graphviz
estimator=unscaled_tree
export_graphviz(estimator,
                out_file='test_unscaled.dot',
                feature_names=X.columns,
                class_names='phyc',
                rounded=True,proportion=False,
                precision=2, filled=True,)

from subprocess import call
call(['dot','-Tpng', 'test_unscaled.dot', '-o', 'test_unscaled.png','-Gdpi=600'])


from IPython.display import Image
Image(filename = 'test_unscaled.png')`

#Tree maxmin scaled

`from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler(feature_range=(0,1))
dfs = scaler.fit_transform(da)
dfs = pd.DataFrame(dfs, columns=['dfe', 'mld', 'nh4', 'no3', 'po4', 'rsn','si','sos', 'tos', 'wo5','phyc'])
Xs = dfs.drop(['phyc'], axis=1)
ys = dfs['phyc']

Xs_train, Xs_test, ys_train, ys_test = train_test_split(Xs, ys, shuffle=False,test_size=0.1, random_state=101)`
`scaled_tree= model.fit(Xs_train,ys_train)
ys_pred = scaled_tree.predict(Xs_test)`
`from sklearn.tree import export_graphviz
estimator=scaled_tree
export_graphviz(estimator,
                out_file='test_scaled.dot',
                feature_names=X.columns,
                class_names='phyc',
                rounded=True,proportion=False,
                precision=2, filled=True,)
from subprocess import call
call(['dot','-Tpng', 'test_scaled.dot', '-o', 'test_scaled.png','-Gdpi=600'])
from IPython.display import Image
Image(filename = 'test_scaled.png')`

#Tree arbitrary scaled

`dfr = da.copy(deep=True)
dfr['dfe']=dfr['dfe']*1e9
dfr['nh4']=dfr['nh4']*1e7
dfr['no3']=dfr['no3']*1e7
dfr['phyc']=dfr['phyc']*1e5
dfr['po4']=dfr['po4']*1e6
dfr['si']=dfr['si']*1e5
dfr['wo5']=dfr['wo5']*1e9`
`Xr = dfr.drop('phyc', axis=1)
yr = dfr['phyc']
Xr_train, Xr_test, yr_train, yr_test = train_test_split(Xr, yr,test_size=0.1,random_state=101,shuffle=False)`
`arscaled_tree=model.fit(Xr_train,yr_train)
yr_pred = arscaled_tree.predict(Xr_test)`
`from sklearn.tree import export_graphviz
estimator=arscaled_tree

export_graphviz(estimator,
                out_file='test_arscaled.dot',
                feature_names=X.columns,
                class_names='phyc',
                rounded=True,proportion=False,
                precision=2, filled=True,)


from subprocess import call
call(['dot','-Tpng', 'test_arscaled.dot', '-o', 'test_arscaled.png','-Gdpi=600'])

from IPython.display import Image
Image(filename = 'test_arscaled.png')`

Labels: Bug, Needs Triage