Yeah considering the SCOTUS just said they have to bring back the other guy from El Salvador and they flat out said they wouldn't, whether something is legal or not is truly only relevant if the democrat are in power.
Although that is technically legal, at least at a superficial level. The court's demands come with limits: if another country decides to not let the USA recover a deportee, it's not like the courts can oblige the US government to infringe that country's sovereignty.
Of course everyone knows that the US administration and the dictator of El Salvador are in cahoots. The dictator will do whatever the US administration tells him on this issue, and he knows that the administration does not want the deportee back. So El Dictador goes in front of the cameras and says he won't give the deportee back, and the US administration pretends "Oh well nothing we can do". The subterfuge, dishonesty and disrespect for the law are transparent, but the courts rely on evidence.
It does mean that the Trump administration could do that to US citizens as well. Whether it feels it could get away with it is another matter, as exiling one's own citizens is likely to be vastly more troubling to a population than expelling foreigners without due process.
* * *
I mean, the other thing I would say about SCOTUS is that they reap what they sowed. Their actions and rulings were critical in constructing and lubricating the mechanisms which have led to an executive that feels empowered to tell the judiciary to go fuck themselves.