Arducam 12MP IMX477 HQ Camera problem

12MP IMX477 HQ Camera captures some shots then I get “mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board”

I’m doing an OCR python application using raspi 4 8G. The camera sometimes capture 5000 shots with no problems, sometimes I can only manage to get 9 shots then “mmal: No data received from sensor. Check all connections, including the Sunny one on the camera board” message appears. The weird thing is that when I restart the application ,without rebooting the pi, the camera works for some time and then the message appears again. I’m using the HDMI and break out board that come with Arducam’s 12MP IMX477 HQ Camera.