Any webhook will be deleted after 19 consecutive retries, which is generally an indicator that an app's server isn't responding, responding with the expected reply (200), or not replying quick enough. Below are a few of the current resources we provide as an overview, a setup guide, and for troubleshoot webhooks:
There is an a extensive setup guide available for the three (3) configuration types offered (HTTPS, Pub/Sub, EventBridge).
The troubleshooting resource covers investigations steps for multiple scenarios, such as troubleshooting deleted subscriptions.
Based on the post it sounds like this might be specific to the framework you are using to build your app. While I'm not a Python developer and won't be able to assist with any code, searching online I was able to find a few examples of basic webhook servers built in Flask. That said, if the app server/configuration can't handle volume or reply with the expected response as quickly as the required < 5s , instead consider using either of the other config options (Google Cloud Pub/Sub or Amazon EventBridge) - more info here.
Lastly, we would suggest keeping an eye on the community in the case that others have insights, or you choose to share updates and solutions here down the road - Best