W3 Cache redirects to front page when I press purge all caches

It’s because you have set the Referrer Policy header incorrectly set in the W3TC page cache.

Referrer Policy
This header restricts the values of the referer header in outbound links.
**Directive: same-origin**

…will fix it. If your overall Directive is “same-origin” and you set the Referrer header to something different (such as “origin”), this error will occur. I changed mine to same-origin and the problem was immediately fixed.