This question is closely related to Can the Queen refuse to suspend the Parliament? but based on the new situation given the Supreme Court ruling.
Suppose the Prime Minister asked the Queen to prorogue Parliament at a point where something he does not like is about to happen, with the effect of frustrating or preventing the ability of Parliament to carry out its constitutional functions without reasonable justification. The UK Supreme Court, on 24 September 2019, ruled that the Order in Council that she issued to prorogue Parliament in that situation was "unlawful, void and of no effect and should be quashed".
Can the Queen decline to follow the Prime Minister's advice if he is advising her to take an action she positively knows to be unlawful because of a UK Supreme Court decision? This is different from her merely disliking the action, or even suspecting an action might be unlawful.