Hi Matthew,
Since the checkout window opens and immediately closes without deducting your balance, this sounds more like a Microsoft Store checkout issue than a completed or declined purchase.
First, press Win + R, type wsreset.exe, and let the Microsoft Store reopen. Then go to Settings > Apps > Installed apps > Microsoft Store > Advanced options and try Repair. Also make sure Windows and the Microsoft Store are fully updated, then sign out and back into the Store.
If it still happens, check that your Microsoft account region and billing details match the region of your Store balance. Microsoft account funds can have regional restrictions.
As no money is being deducted, I would avoid repeatedly attempting the purchase and contact Microsoft Store Support if the checkout continues closing.
Thank you, and feel free to respond back for more assistance.