What you’re after is a feature called Pre-roll, so the camera recording clip includes the moments before the motion detection occurred, because of the power overhead this is usually limited to the hard-wired cameras and doorbells.
This was my biggest issue with my Gen 1 Ring Doorbell, I’ve now...