The solution above works for Javascript tag and for Iframe code, although in this case, the file to be edited is afr.php line 3635. I hope it helps you.
#$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? $aBanner['url'] ?? '');
$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? '');