Automation: option to deactivate (and not only activate) doorbell motion detection (e.g. to combine with external motion sensor/door sensor)

When I leave home the doorbell camera always records me leaving. Of course I would like to get notified when a motion is detected but I do not need a notification everytime I leave my home.

A solution I have come up with could be to combine sensors with the doorbell. E.g. when moving past an external motion sensor shortly before I open the door or with a door sensor when opening the door, the doorbell’s motion detection would be deactivated for a configurable amount of time.

Or let the motion sensor / door sensor trigger modes like home/away/custom.

How do you prevent that the doorbell detects you back and notifies you when you leave your home?