In Harry Potter and the Prisoner of Azkaban, his patronus was working on the Boggart (blocking it from approaching him) it just wasn't very effective in pushing it away from him:
To make matters even worse, Harry’s Anti-Dementor lessons were not
going nearly as well as he had hoped. Several sessions on, he was able
to produce an indistinct, silvery shadow every time the
Boggart-Dementor approached him, but his Patronus was too feeble to
drive the Dementor away. All it did was hover, like a
semi-transparent cloud, draining Harry of energy as he fought to keep
it there. Harry felt angry with himself, guilty about his secret
desire to hear his parents’ voices again.
Harry Potter and the Prisoner of Azkaban
By the time we see him use another Patronus on a Boggart, it's become fully corporeal and capable of interacting with solid matter. Instead of hovering like a vague silver cloud it's now quite literally erupting from his wand in the form of a charging stag. Clearly it's a vastly more powerful spell:
A silver stag erupted from the end of Harry’s wand and galloped
towards the Dementor, which fell back, and tripped over the hem of its
robes … Harry had never seen a Dementor stumble. ‘Hang on!’ he
shouted, advancing in the wake of his silver Patronus, ‘you’re a
Boggart! Riddikulus!’ There was a loud crack, and the shape-shifter
exploded in a wisp of smoke. The silver stag faded from sight. Harry
wished it could have stayed, he could have used some company … but he
moved on as quickly and quietly as possible, listening hard, his wand
held high once more.
Harry Potter and the Goblet of Fire