Al-Hafidh Ibn Hajr (رحمه الله) said:

“Repelling an affliction with du’a is like repelling an arrow with a shield. It is not a condition for belief in al-Qadr (divine decree) that you do not carry arrows nor seek protection with a shield.”

Badhl al-Ma’un (p. 322)