What if the WH doesn’t agree with the law being heard?
Do they still have to file an Amicus Brief?
Or can they stay away?
Most Supreme Court cases do not involve a challenge to the validity of a federal law; they involve either a question of the interpretation of a federal law, the validity of a state law or court decision under the federal Constitution, or something similar.
If the validity of a federal law is involved, and the Administration doesn't want to defend the law (as Obama did in the DOMA case, and other administrations have occasionally done in the past), the DOJ will say so in their brief, but they won't refuse to file any brief at all if a brief has been "requested" by SCOTUS.