The fasting person who remembers Allah ﷻ the most earns the greatest reward. The Prophet ﷺ said that the highest reward for fasting goes to those who constantly engage in dhikr. Ibn al-Qayyim explains this applies to all acts of worship: more remembrance means more reward.
It is recommended for a fasting person to frequently remember Allah ﷻ while fasting so as to excel in his fasting.
In a Ḥadīth which some scholars deem authentic, the Prophet ﷺ was asked about a number of religious observances; among which was fasting. It was said to him: Which fasting person attains the most reward? He ﷺ replied: “Those who engage in the remembrance of Allah ﷻ the most”.
Imām Ibn al-Qayyim, in his book al-Wābil-us-Sayyib, derived a beneficial principle from this Ḥadīth that pertains to all acts of worship: The person who attains the most reward in any form of worship is he who engages in the remembrance of Allah ﷻ the most while in that worship.