The Lord wants to hear prayer, even long prayer, but not as a coverup for one’s sin. Therefore, He denounced the Pharisees, who did this very thing,
“Woe to you, scribes and Pharisees, hypocrites! For you devour widows’ houses, and for a pretense make long prayers. Therefore you will receive greater condemnation” (Matthew 23.14).
If you were God, and you heard the Pharisees praying to you, just after they had devoured a widow’s house, would you be impressed with the prayer? No, you would be angry, and you would demand that the Pharisee treat others well.