PubSub message not getting pushed to dead-letter after max retry configured

I have configured a dead letter to my Pub/Sub subscription with a maximum delivery attempt of -5. Still, I am seeing more than 5 retries in logs.

You can apply retry settings on the publisher client or publish requests using this documentation.