Since another government is involved, ie the USA, it can be viewed as a foreign relations matter as well.
Therefore the Queen and PM May can have some say.
They may have to wait until their court rules, but they are not without power to intervene.