It's only when you reach victory or die. In adventure mode I haven't wired up a "victory" condition yet so the only way to get a highscore unfortunately is to end your run. I know, that's terrible. I've got plans for adventure mode to have a "Retire" function where you can end your run and then leave your character as an NPC that you can interact with in later runs. That would trigger a leaderboard submission too.