Quick answer: GameMaker Room End event firing after objects are already destroyed? Object destroy precedes Room End - move cleanup to Cleanup Event or use ds_list to track resources.
Closing a level should save scores. Room End handler can't access the score keeper - it was destroyed first.
Use Cleanup Event
The Cleanup event fires before destroy. Save and serialize there.
Or use a persistent manager
Persistent score keeper survives Room End. Read from it after the room transitions.
Track in autosave
Save periodically during play. Room End cleanup becomes a backstop rather than the primary save path.
“Event ordering in GameMaker is documented but counterintuitive. Read the docs once; never rely on intuition.”
Maintain a per-project event lifecycle cheat sheet. Once written, it answers most 'why didn't this run' questions.