Hello @Lex,
When working with stm32cubeMX, it's important to understand that the tool provides initial configurations but it might not cover all possible combinations or specific use cases.
For your specific use case, STM32CubeMX does not allow this configuration directly, you will need to manually adjust the generated code.
To prevent overwriting your manual changes you can use the /* USER CODE BEGIN */ and /* USER CODE END */ sections provided, Alternatively, create a separate function for your PWM configuration and call this function from the main application after the MX_TIMx_Init() call.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.