Will an automatic shutoff valve stop every type of leak?

No. The valve can only stop water flowing through the pipe it controls. It may not stop roof leaks, drain backups, groundwater, HVAC condensate, or water stored inside an appliance or tank. System design should identify which leak sources can realistically be controlled through the selected valve.