It sounds like you're facing a dilemma with your home security cameras.
To achieve the functionality you want, you might need to use custom
scripting or automation. One common approach is to use a smart home
platform like SmartThings, Home Assistant,...