Global variables shouldn't reset when going to a new layout. Are you using a "Reset global variables" action with an "on start of layout" event? If so, you will need to save the score to a local or instance variable, or to local storage before resetting the globals. You can then reassign the value back to the global variable after resetting.
If you aren't using reset global variables then you must have an action in your code somewhere that is setting the score back to 0.