Not sure if this is already known, but I've never seen it mentioned anywhere. The initial state of the music box is re-rolled every time you enter the room. I tested this on Sourcenext with Classic Rebirth, but I believe it applies to all versions. Given that the PC version has door skip and each switch takes a couple seconds, I wonder if it's actually viable to bust a quick turn and try again if you see you've gotten particularly bad RNG?
You lose about 2.5 seconds for each change so it's a matter of doing your own math. Best case scenario getting 1 change after getting 6. With 4 changes it may be not worth (because you are not guaranteed to always improve the rng). Too lazy to do the math myself.
That's a good point. The average number of changes should be roughly 3, so at 2.5 seconds per change you should expect a 7.5-second puzzle on average. A 4-change would be 10 seconds, so it's only worth re-rolling on a 4-change if you can leave and re-enter the room in less than 2.5 seconds.
Edit: Actually, the math is a little worse than I thought when you account for the fact that you can't get a 0-change. The average number of changes is closer to ~3.05. That's a 7.625-second puzzle on average, so only worth re-rolling a 4-change if you can do it in less than 2.375 seconds. It should definitely be worth it for 5 or 6, though.