Statistical tests measure differences between samples in different ways and are sensitive to different aspects of the distributional differences.
It's certainly possible for one test to reject and another test (perhaps designed for testing a somewhat different hypothesis) to fail to reject when applied to the same sample at the same significance level. (However, you seem to be misinterpreting what failure to reject implies -- it does not mean that the test shows the population distributions are the same. It only means that the differences in the sample weren't large enough to detect whatever difference there might have been.)
In fact that's what we should hope -- that a test that's designed to pick up more specific kinds of differences should be slightly more sensitive to those kinds of differences we're most interested in.
In the case of the Kolmogorov-Smirnov test, it's intended to pick up any kind of difference in distributions, but tends to have less power to detect differences in the tails than say Tony Pettitt's two-sample version of the Anderson-Darling (doing slightly better at differences in the middle. The Wilcoxon-Mann-Whitney by contrast is focused on picking up differences that tend to make one variable typically "larger" than another (alternatives of the form $P(X>Y)>\frac12$ which encompasses location shift alternatives among a host of other possibilities). At the same time, it can't detect a shift in scale that's not accompanied by a difference in location (e.g. a difference in variance of two normals with the same mean). Because its statistic concentrates on a more particular kind of difference in distribution, it does better at seeing when that's the kind of difference that's present.
Here's a pair of samples where the Wilcoxon-Mann-Whitney rejects and the Komogorov-Smirnov does not:
10.110 10.372 10.038 10.159 9.716 10.741 10.637 9.417 9.751 10.014
11.273 11.199 10.575 11.051 10.214 10.448 12.439 10.308 10.225 9.387
Looked at pictorially, the Kolmogorov-Smirnov is looking at the biggest vertical distance between the two ecdfs (which is anywhere just to the left of the second-smallest blue point at 10.214 and to the right of the red point at 10.159); it picks up that there's been a lot of red points with only the one blue one. Meanwhile the Wilcoxon-Mann-Whitney is focused on the tendency to have a lot more red points to the left of blue points than blue points to the left of red points.
As we see here, where the Wilcoxon-Mann-Whitney attains a p-value of 4.3% while the Kolmogorov-Smirnov has a p-value of 5.2%:
Wilcoxon rank sum test
data: x and y
W = 23, p-value = 0.04326
alternative hypothesis: true location shift is not equal to 0
Two-sample Kolmogorov-Smirnov test
data: x and y
D = 0.6, p-value = 0.05245
alternative hypothesis: two-sided
In this case I made the data by generating two random (normally distributed, as it happens but this is not important) samples and then shifted one slightly up (just enough to lead the rank sum test to reject). Since it's somewhat more sensitive to that kind of difference than the Kolmogorov-Smirnov two sample test is, there was a good chance that the Kolmogorov-Smirnov test might not pick up the difference at that significance level (and that's what happened).
p value>0.05then accept null hypothesis, which means same distribution. $\endgroup$