It is clearly a bug : many spells with 30 feet+ range oddly cannot cast on something about 10 feet upwards.

It is the case of Sacred Flame for example.