If a Dragon Ruler monster has been set by a card like Book of Moon, then at the End Phase, when it is supposed to return to the hand, if it is still face-down, it won't return to the hand (its trigger effect won't activate).
If the Dragon Ruler has been set and then flipped face-up again, then its effect will trigger in the End Phase, causing it to return to the hand.
If the Dragon Ruler has been set and then flipped face-up again, then its effect will trigger in the End Phase, causing it to return to the hand.