In Steam, everything is much simpler...
Viewing post in Knightly Passions [1.21 version] 18+ comments
Yes, it seems that you can refund both $5 purchases by contacting itch.io and purchase it once for $10 (or the other way around). It seems that in this case they mostly accept the refund. By the way this issue is completely itch.io's fault. The itch.io developers have agreed that it is an issue since 2016 but never actually bothered to solve it. This is an issue for every game that offers multiple payment tiers.