Firstly, dash cams are not surveillance cameras and as such are not really suitable for this use. There are countless, weatherproof dedicated surveillance CCTV cameras on the market that are much more appropriate for this purpose and that will perform far better.
Secondly, although surveillance cameras, like many dash cams on the market include motion detection, it is not a useful mode for what you have in mind to accomplish. Motion detection is really only useful in a perfectly still indoor environment such as an office after hours or a warehouse where the only moving object in the field of view will be the target of your surveillance. In any outdoor setting, there are many things that will trigger false, unwanted captures such as wind blowing through trees, birds flying by, a cat walking past or whatever. Even the movement of clouds can trigger motion detection. Another issue is that the motion detection technology in most dash cams is relatively crude when compared to current dedicated CCTV cameras. If something happens, you could easily miss an event because the camera didn't start to capture the event until it is almost over or the person in view stops moving for a short time and the camera suddenly decides there is no motion anymore. There are some dash cams on the market that feature "parking mode" that pre-buffers the video in the event of an incident such as someone bumping into your car when you are not around but again, this is not going to serve the purpose you have in mind.
As I've already mentioned, there are many CCTV cameras on the market, some of which have become quite affordable these days. Do some research where you can learn about this technology such as at the
CCTV Forum.
Some people, myself included have indeed used dash cams (for me, especially Mobius cameras) for occasional short term surveillance use, but they are really not the best thing for this, except in certain specific circumstances. There are many reasons I could descibe but one important one is that they are not designed to run 24/7, even if set for just motion detection.