The way you save high score may be the problem. If the event on your screenshot is top-level event, it will be executed many times per second. If at the same time you switch to another layout or restart the layout, it will try to read from and write to Local Storage at the same time. And this may be the reason why it doesn't work.
Ideally you should only read the score once at the start of the game. For example in loader layout. And save the score also only once at the end of the level.