Alright, I found the problem. It is an issue with specific Cortex-M7 Core revisions where the change of a register functionality causes the debugger to not mask specific bits which prevent entering interrupt handlers on stepping. More info about this issue can be found here and here.
I added the following to my system init and it seems to be working fine now:
(DBGMCU)->APB1FZ = 0x7E01BFF;
(DBGMCU)->APB2FZ = 0x70003;