When a word ends in ra, first decide whether recitation is connected or a pause is made. At a pause, there is a further distinction between complete stillness and retaining part of the vowel through rawm.
«وَالْفَجْرِ» in connection: ra has kasrah and is light.
«وَالْفَجْرْ» with full pause: ra is still after still jim; fathah on the earlier fa leads, by the ordinary rule, to a heavy ra.
The same word with rawm: a trace of its original kasrah is retained, so ra is light.
This is why identical spelling does not guarantee identical phonetic treatment. The actual reading situation determines the rule.