When $r_1=r_2=r$ the orbit is a circle of radius $r$. The gravitational force on the planet is then the centripetal force because the point to which the gravitational force on the planet is directed is the same as the centre of the circle in which it is moving.
However if $r_1 \ne r_2$ then the orbit is an ellipse not a circle. The local radius of curvature $r$ of the ellipse at each of the extremes $P_1, P_2$ (where $r_1, r_2$ are measured) is not $r_1, r_2$ respectively. See diagram below.
The gravitational forces at $P_1, P_2$ are directed towards the Sun $S$ and not towards the local centre of curvature $C$. To see this examine what happens when the planet has moved a short distance from $P_1$ to $P_1'$. Then the gravitational force is directed towards $S$ not $C$ - these are 2 different directions. This is true however close $P_1'$ is to $P_1$.
Therefore the gravitational force at $P_1, P_2$ is not equal to the centripetal force at these points.