If dollars were all that mattered, the US would have opened their arsenal to China -- or Iran -- who will pay top dollar for US tech. The fact is that dollars take a distant back seat to national security. Pakistan is seen as an obstacle to long term US interests: both as China's ally and as an impediment to their proxy, India's, hegemony.
Like I wrote earlier, the US has all but admitted that Balkanization of Pakistan is a strategic US goal -- one can only hope Pakistan stops living in the past that Uncle Sam will save the day somehow. This is not the 1970s -- US interests have done a 180 and we had better get with the program.
Moreover, the codes may be supplied to India by Israel, irrespective of how they obtain them.
This contradicts your previous paragraph. How can the US milk India for R&D (presumably by supplying them with US weapons) and, at the same time, portray a Pakistan v/s India fight as a showcase of American v/s Russian-Euro tech?
India is widening the quality gap with Pakistan. Earlier, it was Russian tech but, increasingly, they are using Israeli tech. As people know, much of Israeli tech is based on American tech so, indirectly, India is getting some of the best American tech.
Compared to that, the US is offering ancient technology to Pakistan, and even that, grudgingly, to stop Pakistan from running full speed into the Chinese camp. The only reason Pakistan has even the faintest hope of competing with India is because of access to Chinese (and some European) technology.