Hi @Benoît Vidotto ,
It may be an issue related to the bootloader section of the code: you might have overwritten it, so I suggest you to restore it, using the file with the bootloader, in the FP-IND-PREDMNT1 firmware function pack.
The procedure is described in the UM2566 user manual, page 7 (STM32CubeProgrammer + DFU mode).
For example, you can use the STM32L4R9ZI-STWIN_PredictiveMaintenance_BL_v2.3.0.bin, which is the factory firmware of the STWINKT1B, that you can find in \Projects\STM32L4R9ZI-STWIN\Demonstrations\Predictive_Maintenance_BLE\Binary folder.
If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.
-Eleon