UART does not work properly after changing HSI to MSI in STM32L152
It is most likely that the intenal oscillator has just too much tolerance. They are factory calibrated at 3.0V and 25 °C, and HSI should be within 1% anf MSI should be within 0.5%.
So if you have not calibrated them to be accurate in your operating conditions, they could be out of required tolerance for UART comms.
Basically, for anything that requires good frequency precision, like UART comms, an external crystal should be used.
There is some possibility that since slower clock causes missing bytes, that it might have simply related to how your code runs at slower clock and cannot receive all bytes.