STM32 External Interrupt via GPIO cannot be triggered after waking up from STOP mode
For me, a simple HAL_NVIC_SystemReset(); did the trick.

Update:

I also found out that this is sufficient and does not require a reset:

  HAL_NVIC_SetPriority(IRQn, 1, 1);
  HAL_NVIC_EnableIRQ(IRQn);