It's due to the day/night buttons being anchor tags as opposed to any Safari-specific issue.
If you wanted to keep the the ability to link to specific states, but avoid the history issue, you'll need to use the History API — https://developer.mozilla.org/en-US/docs/Web/API/History/rep...