The on-surface synthesis of edge-functionalized graphene nanoribbons (GNRs) is challenged by the stability of the functional groups throughout the thermal reaction steps of the synthetic pathway. Edge fluorination is a particularly critical case in which the interaction with the catalytic substrate and intermediate products can induce the complete cleavage of the otherwise strong C–F bonds before the formation of the GNR. Here, we demonstrate how a rational design of the precursor can stabilize the functional group, enabling the synthesis of edge-fluorinated GNRs. The survival of the functionalization is demonstrated by tracking the structural and chemical transformations occurring at each reaction step with complementary X-ray photoelectron spectroscopy and scanning tunneling microscopy measurements. In contrast to previous attempts, we find that the C–F bond survives the cyclodehydrogenation of the intermediate polymers, leaving a thermal window where GNRs withhold more than 80% of the fluorine atoms. We attribute this enhanced stability of the C–F bond to the particular structure of our precursor, which prevents the cleavage of the C–F bond by avoiding interaction with the residual hydrogen originated in the cyclodehydrogenation. This structural protection of the linking bond could be implemented in the synthesis of other sp2-functionalized GNRs.