How do you maintain idempotency with Azure EventGrid webhooks?
It's the way EventGrid is implemented if you look at the documentation
If the endpoint responds within 3 minutes, Event Grid will attempt to remove the event from the retry queue on a best effort basis but duplicates may still be received.
you can use back-end code to clean up logs and stored data, using event and message IDs to identify duplicates.