If you want to verify this for yourself, just try it out on your favourite ladder. You will see that the top pulls away from the wall just before the ladder becomes horizontal.
To understand mathematically (or rather, physically) why this is true, suppose for a moment that there was no gravity. Then, when you pull the ladder, you will pull the entire ladder as a unit, with both top and bottom moving away from the wall with the same speed.
The only reason the top stays in contact with the wall for most of the time is because of gravity. If the wall were not there, gravity would cause the top of the ladder to fall to the ground in a path like that indicated below:
Therefore, the effective force of gravity on the top of the ladder (actually, the combination of gravity and the rigidity of the ladder that prevents the ladder from shrinking in length and collapsing in a heap) is as shown in the diagonal purple arrow in the picture below. This effective force can be thought of as the sum of two forces (the horizontal and vertical blue arrows): one that pushes the top of the ladder against the wall, and one which slides the top of the ladder down the wall.
As the ladder gets more and more horizontal, the effective force acting on the top of the ladder (the diagonal arrow) becomes closer to vertical, and the force pushing the top against the wall will become less and less, as you can see from the shortening of the horizontal arrow between the above picture and the one below:
Once the force pushing the top of the ladder against the wall becomes less than the force with which you are sliding the bottom of the ladder away from the wall, your force will prevail and you will pull the ladder away from the wall. Once this happens, the top will be in free-fall and no longer governed by the same set of equations.
A good exercise is to try to figure out the equation for the position of the top of the ladder during this free-fall stage.