Why does the Kruskal Wallis test shows a difference but Wilcoxon doesn't find any between the groups?

Why does the Kruskal Wallis test shows a difference but Wilcoxon doesn´t find any between the groups, even tough the rank medians which are tested as far as I know look very different, and Dunn test as post hoc finds a difference?

Does it have to do with sample size n<5 so no chi-squared distribution?

Here is my test data for R + dunn.test library

test <- data.frame(TR=c("A","B","A","A","C","B","B","C","C","D","D","D"),REP=c(3,1,1,2,3,2,3,1,2,1,3,2),VAL=c(22,88,24,38,24,72,72,29,15,14,21,17))
attach(test)
boxplot(VAL~TR)
TR<-as.factor(TR)
shapiro.test(VAL)
kruskal.test(VAL~TR)
dunn.test(VAL,TR, method = "bonferroni",altp=TRUE)

• Possible duplicate of Non-significant Kruskal-Wallis and significant post hoc tests Oct 31, 2019 at 20:53
• No, this is not necessarily a duplicate. The other question was asking if it was appropriate to exclude p-values for post-hoc pairwise comparisons with a nonsignificant omnibus test. The question in this thread is asking more for an explanation of why this might occur that the omnibus is significant but none of the pairwise comparisons are significant. This is different. The OP should look at the literature on appropriate pairwise comparisons after a KW test-- Wilcoxon rank sum is not necessarily the right approach.
– LSC
Oct 31, 2019 at 20:59
• Also possibly relevant Mann-Whitney (2 groups) contradicted by Kruskal-Wallis (3 groups) (I mean aside from the issue that the Mann-Whitney test is inappropriate as a post hoc test for Kruskal-Wallis.) Oct 31, 2019 at 21:16
• Aside: different implementations of post hoc tests use different methods with different degrees of fidelity with respect to the seminal papers in which the tests were advanced: What is the difference between various Kruskal-Wallis post-hoc tests? Oct 31, 2019 at 21:26
• The issue of individual pairwise comparisons not exactly corresponding to the overall test happens even with say one-way anova. The non-rejections regions of the two kinds of test don't exactly correspond - they deal with slightly different questions. It's quite possible to get rejection with one but not the other, or vice versa. Oct 31, 2019 at 23:57