Hello
Based on the same link you provided, did you disabled all your interrupt (as the handler is in the same Flash Bank than the one you try to perform IAP action on)
'--------------'
I only had to prevent the firmware to be interrupted by the SysTick, because the IRQ handler is in flash.
That's the culprit!
No need to move the calling functions to RAM. IAP code is in ROM, which already avoids a conflict with flash.
'-------------'