I don't see why a ray being a sacred weapon is an issue. Best case, you have a higher die roll on a cantrip. This would be a concern if the warpriest was able to stack other damage bonuses on the ray. The best ray builds I have been able seen are still along the lines of expected damage from a similar level fighter (at best) and typically require using non-cantrip spells to be comparable. These builds require levels in casting classes and prestige classes to get the bonus dmg. Thus the warpriest levels get slacked off and the sacred weapon damage boost makes little difference if any. The spell must have a die less than the warpriest sacred weapon die to get any benefit. There are very few ray spells which benefit would from this ability, and those that do are going to fall short on damage comparably without picking up other damage bonuses.
A 20th level warpriest choosing to cast a 2d8 dmg cantrip is not really a concern. Similarly, a 1st level warpriest choosing to cast a 1d6 dmg cantrip is not an issue.