What could be the cause?
After writing to the system clock control register (SCKCR), if you write to SCKCR again before the change in frequency has completed, the writing will be ignored. Therefore, if writing to SCKCR consecutively, please confirm that the written value can be read from SCKCR.
If ICLK and PCLK are set one after the other without checking the written value, there is the possibility that the written value may be ignored. When setting ICLK and PCLK, either write to SCKCR in one batch, or, if setting them one after the other, read the value after each setting to confirm that the value has been written.