Downlink Webhook does not get executed on every downlink

Dear TTN-Community,

I am currently integrating a sensor into TTN. In this process I am using the LORA-Downlink to configure specific settings on the sensor or execute functions to initiate a capture of data. Since the user should not be allowed to execute a function during the processing of another function, I am blocking access to the settings UI in our frontend, until the last downlink was sent. For that I am setting a flag in our database upon sending the command and clearing it within a webhook. The problem I am facing is, that the webhook for the downlink is not executed reliably and I can not seem to find out what the reason for that is. Is there some kind of limitiation within the webhook I am missing? I have enabled the “downlink sent” message within the webhook.

Any hard data would be useful - like logs - and how your webhooks are setup, language & database being used etc.