Just came across this comment and wanted to chime in. I know I'm a bit late here @EdifyYo, but if you're still in need of a solution, I have mine set up like this:
It shuts down the Stream Deck as soon as my screen locks. In my case, I generally use a quick Alfred command to lock if I'm stepping away from my desk.
Unlocking is basically the opposite, as seen here:
Hope that helps