I guess you didn’t select “refresh flash when halting” option.
When you debug code with hardware, go to Hiwave debugger menu “MultilinkCyclonePro”, “Debugging Memory Map”. In the open dialog, select the memory section that need refresh, click “Modify/Details” button, in the new dialog, check “refresh flash when halting”.