It's changing because it doesn't know to not randomly generate things each time its opened.
Try using a boolean, say has_generated, for instance, and save it using the file.save method. Also, save the coordinates for the stars. Once they are generated for that scene, set the boolean to true. That way, each time you open the scene, it will check if that boolean is false before regenerating the stars. If it's true, then tell the code to position the stars at their original coordinates.
I only suggest file.save method, use whatever method you use for saving data.