Most dashcams have a Parking mode option to use the dashcam as surveillance camera when the car is parked. There are two different type of Parking mode: Manual and Automatic (see section 3.5). Most basic dashcams have Manual Parking mode which usually consists of two different settings:
'Parking mode': With this function activated, the dashcam will turn on and start a short recording when a vibration is detected. The 'Parking mode' function can be left active continuously without problems.
'Motion detection': With this function activated, the camera will be in stand-by mode and will start a short recording when a movement is detected. After the recording stopped, it will turn into stand-by mode again. The 'Motion detection' function is preferably only turned on when the car is parked. When left active, it can cause problems with the loop recording.
Note that, regardless of the activation type, the dashcam should always be connected to a power source (hardwire kit or battery pack) in order for the Parking mode to function properly. The dashcam's battery, if it has any, is too small to power the dashcam for a long time.