How about deleting the AppInventor or the assets folder (in which the extensions are saved) beforehand (before testing).
For devices with API < 29:
/storage/emulated/0/AppInventor/assets/
for devices with API ≥ 29 (the assets or external_comps folder):
/storage/emulated/0/Android/data/<packageName>/files/assets/
Example (Pixel 2XL, Android 11 (Beta), API 30:
