To do this you’re going to need to perform a lot of security-based actions on the WindowsApps folder.
Telling the computer to give you total control over the WindowsApp folder will sometimes allow the Store to do its job properly. It may seem a little odd, but sometimes files are modified to not allow you access to them, despite being on your machine and associated with your account. Sometimes the problem lies in the fact that you don’t “own” the WindowsApp file on your computer. Set Yourself as Owner of the WindowsApps Folder