The NSF buys research. PhD funding is not a gift, it is payment for a job. Buying research from citizens or noncitizens is not meaningfully different.