Successful matching resets the $1, even if there's nothing to capture. Therefore, $1 is Barney in the pattern, but it's empty in the replacement part, because the pattern (
$1) doesn't capture anything.
To make the captured string survive a match, assign it to a normal non-magical variable:
my $who = $1;
s/$who/\U$who/gi;
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]