Hi,
I tested the use case you described, and I found there is the same problem on my side (I think there is some problem with internal scripts, but I did not found it). So I invented workaround, which should work.
Do not use debug icon to download your program to micro. Instead of it, use Flash programmer->Flash File To Target.

Choose your Debugger and file you want to flash and click Erase and Program.

After successful flashing, click on debug configuration.

Choose correct configuration (FLASH) and as Debug type session choose Attach. Also check Execute initialization script button and click Debug.

Now you should be able to debug the code you flashed.

Please try this solution, and write me back if it works.
Regards,
Martin