The person is going to use money, whether it is yours or someone else's, to buy whatever it is that they feel is the best use of that money.
Disconnect yourself from any ideas of what the money is going to be used for, and just understand that it will be used to reduce their suffering. If that is a satisfactory use of the money that you give them, then give them the money. Consider, at the same time, putting money aside to donate to local causes, some of whom may be helping the homeless.
Above all though, your money is somewhat valuable, but nowhere near as valuable as your time and effort. Volunteering at these same local causes is even more valuable than whatever spare pocket change.
Just don't turn into a "but they're going to buy drugs with it!" person
I never have used any, so I don't know what the drugs would help with. I see it as just biding time and not reducing suffering long term. A person involved with homeless here in BC said drug use just prolongs the inevitable path to suicide. Oof.