2 verses have
could
in Edition Clear Qur'an by Talal Itani / Yusuf (Joseph)

12:76So he began with their bags, before his brother's bag. Then he pulled it out of his brother’s bag. Thus We devised a plan for Joseph; he could not have detained his brother under the king’s law, unless God so willed. We elevate by degrees whomever We will; and above every person of knowledge, there is one more learned.

12:81“Go back to your father, and say, ‘Our father, your son has stolen. We testify only to what we know, and we could not have prevented the unforeseen.’”