The configuration that provides the maximum FLEX temperature varies with the runway length.
On short runways, CONF 3 usually provides the highest FLEX temperature, and the tail clearance at lift off does not depends on the configuration.
On medium or long runways, the second segment limitation becomes the limiting factor, and CONF 2 or CONF 1+F becomes the optimum configuration, in term of FLEX temperature.
In these cases, the tail clearance at lift off depends on the configuration. The highest flap configuration gives the highest tailstrike margin.
How does the flap configuration affect the tailstrike limit?