So, firstly, "some" will say anything. I don't think it's particularly fair to present that so baldly without nuance. It's pretty close to, "Players just want to win, and if you don't just let them win, they'll become petulant." Which isn't ideal. I am
certain that's not what you're going for here, but it's too easy for it to fall into that.
For my own position, well, aforementioned nuance.
In the ideal case, the answer is "no." However, I have both philosophical and practical (as in, lived-experience) concerns that make the answer a contingent "yes." Let's start with the former.
No: Player agency is not affected by success chances, because agency often lies in the attempt, not in the final result. If that were not true, then IRL agency would be nonexistent; I cannot choose to simply stop being subject to the laws of gravity, even though that is a perfectly cognizable thought and not a logical contradiction (or, at least, our knowledge of physics does not indicate that that is a contradiction.) I cannot choose to reduce my core body temperature to exactly 14.6 C. I cannot summon a bacon, lettuce, and cheese sandwich to my hand without, y'know, actually
making the thing. (We do actually have some bacon...maybe I can convince the family to have bacon sandwiches tonight...)
I won't belabor it further. If rate of success were the determining factor for player agency, "agency" would be rather severely devalued as a concept. But...there's a critical difference between the examples above and how D&D works. That difference is the GM.
Yes: Player agency
is affected by success chances, because success chances are not, and cannot be,
perfectly objective. IRL, my chance of successfully persuading someone to make me a bacon sandwich for dinner is, in some sense, objective; no one "sets" that "difficulty," it just
is whatever it is. In a game, however, those success chances are often determined, at least in part, by GM preference. This opens the door for denial of agency, not through
outright preventing players from doing something, but through making it
effectively impossible. This is the mathematical parallel of a similar thematic move, where the GM will "allow" players to (for example) play races the GM disapproves of...but in practice, such characters will be dragged through an intentionally unpleasant and hostile gameplay experience. This is a
very old approach, but it
certainly hasn't gone away.
In its mathematical form, this "ban by allowing
poorly" approach takes many forms. The "roll stealth every single round" form, for example, which is often more a matter of misunderstanding iterative probability. (Having a 90% chance to succeed means you've got better than 50% chance to fail in the first 7 attempts.) It does not
always reflect that lack of understanding though--sometimes, the fact that it is iterative is exactly the point, since passing three difficult checks is obviously much harder than passing just one. The "alright, but you have to roll 20" is another common form. A third is to "allow" by demanding an exorbitant price tag, whether in actual wealth/materials or in more intangible things like reputation.
And the tricky thing is...SOME of the time, this is totally fair! Sometimes a thing really should require multiple checks. Sometimes a task really should require that you get a critical success. Sometimes things just really are costly, or the player is asking to do something that really would ruin their reputation. Etc.
The problem comes in when GMs exert this influence
for the purpose of preventing behavior, not for the purpose of recognizing that a particular task really should be difficult or costly.
So: IF we presume a consistently fair and reasonable GM (nobody's
perfect, but reasonable consistency is a fair expectation), who gives the players reasonable opportunity to learn the difficulty and/or cost, then no, success chance does not particularly correlate with agency. As soon as that assumption ceases to be true--as soon as these things become unreliable in the fairness and/or reasonableness department--we get a loss of agency.
If the GM never uses success chances as a way to soft-ban/soft-block player choices, then no. If they
do at any point do that, then yes.