Authorizing funding is the responsibility of the legislative branch. Wouldn't the agencies, which are executive, need to follow the prescription of congress on use of funds to investigate?
Yes. But how restrictively does Congress word its appropriations to agencies, such as the US Postal Inspection Service? If it appropriates them money "to investigate crimes", that would entitle them to spend that money on investigating any category of crime at all (including those with no clear connection to the postal service.) I haven't read the relevant appropriations and authorizations acts, so I don't know how they are actually worded.
Also, even supposing a criminal investigation was in violation of the appropriations laws (money appropriated to investigate one type of crime being illegally redirected to investigate another type of crime instead), that (as far as I know–IANAL) isn't an issue the accused has standing to raise in court.
A (possibly) real example of this happened under the Clinton and Obama administrations, when Republicans in Congress tried to appropriate money specifically to prosecute adult pornography, and the Justice Department (allegedly) illegally spent a lot of it on child pornography prosecutions instead. But even supposing the allegation is true, it was of no legal benefit to the accused.
I can tell you from experience there is never a funding problem, agencies always in excess of cash, especially during democratic presidencies. So much flowing right now you can literally work on anything you want