It is true in the case of heavy anti-aircraft guns (3-K, 52-K, FlaK 18, M1, etc.). But for a small-caliber AAA it will be hard to shoot down an attack plane after the dive when it comes out at low altitude and high speed or on high altitude before the dive. However, since such guns (Oerlikon, Polsten, 61-K, Flakvierling, etc.) often used shells with a contact fuse (HE, APHE, HEIAP) and have a great rate of fire, they can shoot down a plane more easier during the dive than heavy AA-guns with time-fused shells.
Sources:
When the aircraft was reasonably close to the target, a light on the
contact altimeter came on to indicate the bomb-release point, usually
at a minimum height of 450 m (1,500 ft). The pilot released the bomb
and initiated the automatic pull-out mechanism by depressing a knob on
the control column. An elongated U-shaped crutch located under the
fuselage swung the bomb out of the way of the propeller, and the
aircraft automatically began a 6 g pullout. Once the nose was
above the horizon, dive brakes were retracted, the throttle was
opened, and the propeller was set to climb. The pilot regained control
and resumed normal flight. The coolant flaps had to be reopened
quickly to prevent overheating.
– Wikipedia about Ju-87, a german dive bomber.
Shells for AA-gun 61-K:
- УОР-167 (UOR-167) - FRAG-T.
- УБР-167 (UBR-167) - APC-T.
- УБР-167П (UBR-167P) - APCR-T.
(letter "T" means "tracer").
Fuses for fragmentation rounds - МГ-37 (MG-37) - contact, with self-destruction at 4000 m.
– from Wikipedia article 37-мм автоматическая зенитная пушка образца 1939 года (61-К)