وَيُصَلِّي الْمُتَنَفِّلُ خَلْفَ الْمُفْتَرِضِ.
Meaning: A person offering a voluntary prayer may follow an imam offering an obligatory prayer.
Here the imam performs fard and the follower nafl. This is valid in the Hanafi approach, subject to the other conditions of following, because the imam’s prayer is of the stronger degree.