This is a known bug (camera stops local recording about 1.5 hours after losing WiFi). This post suggests a workaround: