User Activity

I'm running v1.26.1 of CubeMX and any code that I add between the /* USER CODE BEGIN.. and /* USER CODE END.. comments gets deleted every time I (re)generate the project. I have the 'Keep User Code when re-generating' option ticked. What am I missi...