In this Lilypond-generated score, the whole notes are in different positions. The first is slightly to the left, the middle one is approximately centered, and the right one is slightly to the right. Is there a reason for this?
Whole notes should appear near the beginning of the measure. When other notes are present, it should be vertically aligned with the first note/rest in the bar. This is a good example from PianoAndSynth.com:
You can see that each first note is approximately the same distance from the left barline or key signature, whether a whole or otherwise, and no matter how wide the bar is. This is to make it easy to see exactly when the note should begin to be played — you can rely on the type/shape of the note to know how much of the bar it should occupy.
For a bar with just a whole note, you would make the bar thinner but generally not so much that the note would end up centered (and definitely not any thinner than that).
I can only guess that your example varies due to a bug.