Below is the python code for the KS test.
import numpy as np
from scipy import stats
test = np.random.normal(23,10,50)
test_std = (test-23)/10
stat1,p1 = stats.kstest(test,'norm')
stat2,p2 = stats.kstest(test_std,'norm')
print(p1)
print(p2)
OUTPUT
2.5353101018046572e-70
0.9887775065294439
I took a normal distribution mean = 23 and std=10 and compared with normal distribution using KS test then the result is the distributions are not similar but when I standardize the same normal distribution I got the result that the distribution are similar but as KS test works on difference in cdf which will not get affected by the standardization why am I getting different results.