It is worth noting that when it comes to issues relating to Apple ID and purchases, the best course of action would always be to speak to Apple Support first, as they are best placed to aid such issues.
You were refunded for the app, but have changed your mind and want to repurchase it. However, attempting to do that might give the following message:
It's likely an App Store bug. Please do the following:
1. Open the Settings app > Apple ID > Media & Purchases > Sign Out.
2. Visit GoodNotes App Store page and choose Get.
3. Sign in to your Apple ID account and continue with the purchase process.