It appears that the first regex replace does not require escaping?
You can prevent the first evaluation of [ ] by unchecking 'Expand macros in parameter values before calling subroutine' in the Subroutine Call step (but then you can't reference macros like %PROJDIR% in other parameters; another option would be to use the Set Macro action for the TMP_DL_VD_PATH macro [with 'Don't expand' checked]).
You can prevent the 2nd evaluation of [ ] by replacing
%TMP_DL_VD_PATH%
with
" & vbld_TempMacros()("TMP_DL_VD_PATH") & "
|