I had this same issue when trying to install .msixbundle files, which are the modern app equivalents of setup.exe. .msixbundles are handled by a built-in Microsoft app called Microsoft.DesktopAppInstaller but this should work with any modern app.
TheReset-AppxPackagecmdlet will reset the app to its original settings, and the app will react as a freshly installed app.
To fix, open a Windows PowerShell admin window and type:
get-appxpackage *[your app name]* | Reset-AppxPackage
In my case, "get-appxpackage *appinstall*" returned
Name : Microsoft.DesktopAppInstaller
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64
etc...
And piping it to Reset-AppxPackage fixed the problem.