The game did restart on me after I closed the window, but replaying the game for the hard badge is much easier after you've memorized the firing patterns!
Right after you beat the last boss, just remember that gold isn't really that important, so focus on getting max weapon and firing rate so you kill the ships before they can fire!