Is it reasonable to use the Kolmogorov-Smirnov test to assess the normality of a random variable? Context
I am confused by the following post where the accepted answer states that :

You can't really even compare the two since the Kolmogorov-Smirnov is
for a completely specified distribution (so if you're testing
normality, you must specify the mean and variance; they can't be
estimated from the data*), while the Shapiro-Wilk is for normality,
with unspecified mean and variance.

*

*you also can't standardize by using estimated parameters and test for standard normal; that's actually the same thing.


Question
Imagine that I have a random sample of measurements X which I standardise using its sample  mean and variance. May I use the Kolmogorov Smirnov test as a GOF test to assess normality of this random sample ?
$$ H_0 : X_{scaled} \sim N(0,1) $$
Illustration
To illustrate my question here is a code snippet in R :
# We wish to do a Goodness of Fit test that X is a random sample from a Normal Distribution N(mu,sigma^2)
X <- c(10.212, 10.103, 10.242, 10.106, 10.102, 10.095, 10.042, 10.093, 10.302, 10.111)
sample.mean <- mean(X)
sample.variance <- var(X)
# Or that standardized X (scaled.X) is a random sample from a standard normal distribution N(0,1)
scaled.X <- (X-sample.mean)/(sqrt(sample.variance))


# Kolmogorov-Smirnov Test H0 : X ~ N(0,1)

ks.test(scaled.X,alternative="two.sided",y = "pnorm")
# Do not reject the null.
# Shapiro Test 
shapiro.test(scaled.X)
# Do reject the null.

Note that the KS test and the Shapiro-Wilk test gives contradictory results, hinting towards the Shapiro Wilk test being more powerful in this specific case. This is however not my main question although any comments on this is gladly welcomed.
The specific area of interest of this question is if using the KS test on a standardized random sample (with  sample statistics) a sound way to evaluate the normality assumption.

In general, statistical tests consist of two parts: calculating a statistic, and then finding a p-value based on that statistic. You certainly can calculate the KS statistic for a normalized sample, but where you run into trouble is calculating the p-value. The published p-value tables for KS are for running a sample against a pre-determined distribution. By standardizing the sample, you're doing something akin to p-hacking, in that you're essentially altering your null hypothesis after seeing your data (the values of the mean and standard deviation for your proposed distribution are part of the null hypothesis, and you're calculating those from the sample).
I find whuber's characterization "when you standardized the data, you forced them to look a little more like standard Normal values than they had" to be possibly misleading, at least if the reader misses the "standard" part. The Shapiro-Wilk test looks at how well the sample matches any normal distribution, not just the standard normal distribution, and standardizing the data doesn't change the Shapiro-Wilk statistic. The Kolmogorov-Smirnov test, on the other hand, is comparing the sample to a particular distribution, not just to the entire class of normal distributions, and so standardization, by forcing the sample to match a particular mean and standard deviation (namely, $0$ and $1$ respectively), increases the probability of appearing to match the distribution.
So if you want to do a statistical test using KS on a standardized sample, you'll have to find some source for p-values other than the standard formula. I find whuber's conclusion "we cannot even predict the correct p-value from the incorrect one with acceptable accuracy" to not be supported by the argument that precedes it in their answer, however (at least without reading more into the argument). The mere fact that using a different distribution for p-values sometimes increases the p-value and sometimes decreases it does not preclude the use of that different distribution (although there may be additional issues in this particular case that make it impractical). If your statistical test has a particular $\alpha$, then any test that has a rejection region with probability mass less than or equal to $\alpha$ is valid, albeit not necessarily useful.
It is likely, however, that to calculate a p-value, you would need some metadistribution, where the actual distribution you're sampling from is modeled as being randomly chosen from some space of distributions, with some meta-probability distribution over that space. There may be some upper bound for the p-values regardless of the metadistribution, however, in which case you can use that. I'm not familiar with what work, if any, has been done establishing p-values for this case. And given that we already have the Shapiro-Wilk test, you might as well use that.
