Disable Read Out protection STM32
open ST-LINK utility-&gt; go to Target -&gt; Option Bytes
then change the Read Out protection to level 0
Apply, then make a full chip erase.
it has worked for me, hope this helps you
I found the answer in this link
https://community.arm.com/developer/tools-software/tools/f/keil-forum/34824/can-t-disable-read-out-protection