It doesn’t matter what the law says. The constitution does not give the legislative branch that power. They can stipulate it be spent by a certain time - but they cannot force it to be spent.
That’s something for the Supreme Court to sort out. Until then, the law stipulates that Congressionally legislated spending must be completed by end of fiscal year, unless Congress specifically extends the deadline (which it did in this case) or rescinds the spending (which, if done, rescinding legislation must be completed within 45 days of request to do so, else it must be spent by EoFY).
It’s a sensible concern either way. If our representatives decide $X should be spent on Y, it should be done. If our executive can achieve the purpose for less than $X, all the better. Things get weird when Congress deems it should be spent, and President flat-out refuses to; yes Supreme Court should sort that out.