i think yes.
The test statistic only depends on the ordering of data, not its actual value. You can contruct a sample where the test statistic is significant but the subsample medians are arbitrarily close to each other. The example below assumes that data is continuous).
Suppose you had some data where the subsample medians were very different and the U statistic was significant. You could take a transformation of the data which would make both subsample medians arbitrarily close to b (and hence, arbitrarily close to each other). The U statistic would be unaffected since the above transformation doesn't change the ordering of any data.