As detailed in this answer on the math SEanswer on the math SE, weights in a weighted median are expressed duplicates of the datum. In your top example, replace the weights with their multiples of ten, like so:
A B C D E F
weights: 1 1 1 2 1 4
returns: 10% 20% 30% 1% 2% 1%
Sort these by return and you have 1 1 1 1 1 1 2 10 20 30
; the median of this pseudo-dataset is the weighted median, in this case the average of the middle two values, i.e. 1%. If you repeat this exercise for the second set, you'll see that the value is 1.5%.
Also note that the weighted-median is the same for any vector of weights proportional to this one. (This is straightforward to prove, but I leave that to you.)