Run on External Display


Calling all shortcuts experts.
I have a MacOS shortcut that runs a shell script which basically resizes my windows, using Rectangle, nothing really special. My problem is that I can’t seem to get it to work consistently on my external monitor. Somethings the shortcut runs on my laptop display and somethings it runs on my external display. Is there a way to force it to run on my external monitor if detected?