Uphold the law ... how? Who actually does it? The courts can write as many orders as they want, but if they're ignored, they're powerless.
The system is surprisingly simple, it just requires leaders willing to actually uphold it.
Those both risk creating a constitutional crisis, not avoiding one.