Better yet: give them cold hard cash instead of what is arguably monopoly money for many OSS devs. Ironically this is something GitHub made "easy" with sponsorships several years ago.
You don't sponsor people or projects to complete specific issues or build specific features in the first place. Sponsorship is a reward and token of appreciation for doing good work.
Some don't mind doing the overall reward and appreciation thing. And some just have that particular issue that they want handled so the project works - better - for them. Both cases are valid.
I'm not sure how that's related to your initial question of "How do you ensure that funds ear-marked for a donor-specified issue goes toward that issue and not something else?"
You hit up the maintainer and negotiate a deal for that?
If all you’ve got is relative pocket change they probably aren’t going to agree but if you put real money behind it and it doesn’t go against their vision of the project then most people would be willing to accept actual contracting work to expand their project.