I have the same problem! Every time after code generation with STM32CubeIDE and switching back to code perspective, the same code is deleted. In my case, the code being deleted is MX_GPIO_Init();and the code withnin " /* USER CODE BEGIN WHILE */". A...