Thank you for your help!
I also asked for support from Segger and they noticed right away that I was using two different addresses from the same memory sector. For STM32H743II processor the first memory sector is from 0x08000000 to 0x08020000 which means that my bootloader (0x08000000) and application (0x08008000) were both in the same memory sector. For erase, the smallest unit is always one sector, so when erasing the first sector to program my application the bootloader was erased as well.
I modified my application to start at 0x08020000 and everything seems to be working perfectly.
Thanks again for your support!