I have had this issue too with my set up - kind of. The background prefs for screen #1 reverts to not changing at specified intervals/default, but screen #2 is just fine. I have found that it is a conflict with Wacom software/driver/stuff. In fact, Wacom software gets a little wonky when the system puts the screens to sleep - it doesn't wake up properly (pen jumps around, touch comes on and I can't shut it off, etc.) - Restart fixes everything but the background change, unless I do not turn on screen #2, the Wacom device, then the preferences stay.
I really don't use the iMac screen so I like it to swap out the images because I'm old and still believe if you leave one screen on without any action you'll burn it in, plus it helps keep my mind going with little micro breaks where I can glance up and look at a new purty picture (what can I say...)
This happens while running High Sierra on a late 2012 iMac with a Wacom 24" HD Touch Cintiq.