Is there a way to block an IP address without taking hits?

Unfortunately, there is no way to block an IP address without hitting a server. The only thing you can hope for is that the spammer will see that the requests are not getting through and stop hammering your website. But the IP address needs to hit your website first before it can be blocked.

If you have your own domain name, you could also choose to use Cloudflare on your domain. That way, the request can be stopped by Cloudflare and doesn’t hit your hosting account.