I had the same issue, and after reloading a game before the first visit to the puzzle room, it worked. Even though the initial puzzle was also empty, the moons popped up consistently as the wheels turned.
The first time I did it, it looked like several moons were in the same spot and it never returned to noemal.
It was also reported in this thread, where there are some alternatives to bypass the riddle.
https://forums.larian.com/ubbthreads.php?ubb=showflat&Number=753437#Post753437