كتاب الأمور المنهي عنها
17  
The Book of the Prohibited actions
(332)
Chapter: Abomination of saying: "Forgive me if you wish, O Allah!"
(332)
- باب كراهة قول الإنسان: «اللَّهُمَّ اغْفِرْ لِي إنْ شِئْتَ»، بل يجزم بالطلب
Riyad as-Salihin 1743
Abu Hurairah (May Allah be pleased with him) said:
The Messenger of Allah (ﷺ) said, "You must not supplicate: 'O Allah! forgive me if You wish; O Allah bestow mercy on me if You wish.' But beg from Allah with certitude for no one has the power to compel Allah."

[Al-Bukhari and Muslim]

Another narration of Muslim is: "A supplication should be made in full confidence and one should persistently express his desire (before Allah) in his supplication, for no bounty is too great for Allah to bestow (upon his slaves)."

عن أبي هريرة رضي الله عنه أن رسول الله صلى الله عليه وسلم قال‏:‏ ‏"‏لا يقولن أحدكم‏:‏ اللهم اغفر لي إن شئت‏:‏ اللهم ارحمني إن شئت، ليعزم المسألة، فإنه لا مكره له‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏ ‏(‏‏(‏وفي رواية لمسلم‏:‏ ‏"‏ولكن ليعزم، وليعظم الرغبة، فإن الله تعالى، لا يتعاظمه شيء أعطاه‏"‏‏)‏‏)‏‏.‏
Reference : Riyad as-Salihin 1743
In-book reference : Book 17, Hadith 233