It’s the second - HA creates Sun events frequently to keep trackl of the amount of time since sunrise/sunset so the restart should not affect it at all.
Coming back to this later. The thing that made me question this is that one of my sunrise offsets didn’t have a + at the beginning. Turns out offsets require a + or -