Anas reported Allah's Messenger (ﷺ) as saying
When one of you makes supplication, he should supplicate with a will and should not say: O Allah, confer upon me if Thou likest, for there is none to coerce Allah.
Abu Huraira reported Allah's Messenger (ﷺ) as saying
When one of you makes a supplication (to his Lord) one should not say: O Allah, grant me pardon, if Thou so likest, but one should beg one's (Lord) with a will and full devotion, for there is nothing so great in the eye of Allah which He cannot grant.
Abu Huraira reported Allah's Messenger (ﷺ) as saying
None of you should say to Allah (like this): O Allah, grant me mercy, if thou so likest. The supplication (of his) should (be permeated with) conviction (that it would be accepted by the Lord), for Allah is the Doer of (everything) He likes to do, and there is none to force Him (to do or not to do this or that).