As long as necessary (years.)
All the Rinos strutting about as literal Constitutional originalists, you’re wrong on this one. The power of the purse has been passed to the president for emergency declarations via long standing law. Thus the funding has been authorized by congress through that emergency powers act. If congress wants to reject the passed law, make a new law and get that passed and signed into place restricting the executive powers given to him by you.
No, this is a case the USSC would allow to be fast tracked based on the President claiming it to be a national emergency and my guess is even if some lefty Judge issues an injunction it will be over and done by mid year.