Hey. I'm pretty new to automation and I'm having some difficulties achieving the desired flow.
The flow is a very simple resolution/refresh rate change that also changes the projection method. My laptop is connected to my 27'' 4k Monitor and I run games with "Integer Scaling" which requires the display resolution to be 1080p. I was tired of changing it myself so I made a flow like so:

Pseudo-code:
if external monitor is currently on 4k:
change projection mode to external monitor only
change external monitor resolution to 1920x1080 144hz
end
else
change projection mode to extend laptop and the monitor displays
set external monitor to 4k again
end
This works just like how I want it to, but after some time (I didn't measure it properly) the monitor goes back to being 4k for some reason. So I'm seeing blurry graphics in the middle of my game which is very annoying. Can anyone help me resolve this? Basically my goal is to make it so it doesn't change the resolution until I've run the flow again. Thanks.