No. If you are using URL masking for an affiliate link you must use the rel="sponsored nofollow" HTML attribute. Otherwise affiliate links can affect SEO negatively. If the masked URL isn't paid, then Google will determine the destination URL. Though if you can use a direct link, you should always first.