SCOTUS is only there to interpret the intent of legislation and to verify that that intent conforms to Constitutional limitations on government. They didn't rule that there was a Constitutional bar to legislation preventing ED abuse, in fact they explicitly pointed out that there was not, so creating such legislation is not "undermining" SCOTUS but correcting what SCOTUS sees as an omission.
Besides, what "undermining"? SCOTUS doesn't say "we can't overturn evan a bad law, that would violate separation of powers", so shy would Congress have to do so with respect to these inane decisions?
And besides, Congress isn't trying to prohibit states from exercising the rights SCOTUS claims they have, just saying we choose not to pay you with federal money to do it. SCOTUS disn't say "There's no Constitutional problem with abusing ED, and furthermore, Congress is REQUIRED to fund such abuse." The ruling had nothing to do with Congress, and Congress' action has nothing to do with the ruling (other than expressing a desire not to fund it). Big woop.