Recently I had to restore my iPhone.
I made sure my iCloud backup was up to date, reset the phone and allowed it to restore from the backup.
This went really well and after a while, my phone was restored with everything pretty much as I had left it. With a few extra gigabytes of storage (the reason for wiping it!).
However, when I tried to download my previous purchases in Garageband, I received a “Regrant Failed” error.
The solution was simple. I have a separate accounts for iCloud and the App Store. When the phone restored, iOS had used my iCloud account as my iTunes & App Store account.
The answer was to go to Settings, iTunes & App Store then sign out of the account and sign back in with the correct account.
After that, Garageband downloaded its purchases without problem.