Issue: Pi-hole blocks requests successfully but ads will still be loaded in Safari after surfing for a while.
Setup: macOS Sonoma with Safari 17.1, Pi-hole standard install
This fix assumes that Pi-hole is set as your default DNS and there is no misconfiguration like unassigned groups etc.
Fix: Safari > Settings > Advanced > uncheck "Allow privacy-preserving measurement of ad effectiveness"
Don't forget to clear the DNS cache of macOS.