Yes because the DDoS attack will be directed to the servers of your VPN provider rather than your Internet connection. And since the servers of a provider like ExpressVPN, for example, have a large number of protections against DDoS, you will not be impacted at any time.