Umar (RA) went to the Prophet ﷺ to give Sadaqah, seeking to attain this righteousness that Allah mentioned in the verse.
The Prophet ﷺ did not tell him to sell the land and give its value in charity.
Instead, the Prophet ﷺ advised him of the best type of charity, and that was to make the land a Waqf – an endowment – so its proceeds could be used for charitable purposes.
This way of giving Sadaqah would benefit the Ummah not as a one-off benefit but as a continual benefit for all time to come.
And Umar (RA), would be reaping its Ajr all the way until he would stand in front of Allah!