I didn't find a way to trigger action before users uninstall my app (so that uninstall will only happen after action on a trigger will return success) and if there is a way to make that happen please tell me that.
So here is a question about how could I provide a workaround to the user emailing they with a working button which could delete a section of my app in their theme after that they uninstalled
Though there is an API method: https://shopify.dev/docs/admin-api/rest/reference/online-store/sections it turns out that after uninstalling I loose all the access to provide this functionality.
Right after the merchant uninstalls the app, you loss the access to the store.
But there is a way you can make a section or part of code on store to be dependent or run if app exists on the store. And that is via script tags. Make your functioanlity dependent with the script tags because with app uninstallation the script tags added by app gets removed automatically.
Also, if you are wondering to track down the unintsallation then you can register app uninstall webhook. The webhook should be added by app while installating.