Indeed it is a bug (an old one too). The same thing happens with the $ char. In PCRE, $ is a special char, so one must escape it with \$. The bug is that \$ can be used in <subtext> only if there are other characters before or after it.

//var %a, %b = $regsub(abc,/b/,z\$,%a) | echo -a %a
works

//var %a, %b = $regsub(abc,/b/,\$z,%a) | echo -a %a
works

//var %a, %b = $regsub(abc,/b/,\$,%a) | echo -a %a
doesn't work

//var %a, %b = $regsub(abc,/b/,\$\$,%a) | echo -a %a
doesn't work