Do the dialogue choices offer a different experience to the player, as in the actual play unfolds differently and you experience places, people and events you wouldn't have if you had made a different choice? If so, I would consider that some amount of agency.
Depends on the game. BG3 has dialogue options which allow you to ally with various people, which can significantly change the experience. For example, in the opening act, you can choose to ally with the tieflings (protecting the jerk Druid grove from assault, thus assuaging the druids' concerns), or you can choose to support the Druids cutting themselves off from the world (thus dooming the tieflings, changing subsequent acts in various ways), or you can choose to ally with the goblins attacking the grove. This can affect which allies you have over the course of the story, can turn ally playable characters against you or turn enemy NPCs into allies (e.g. Minthara), and has long-running consequences overall. Likewise, in the final act, you can choose which factions you ally with (none, one side or the other, pretend to ally with all of them, etc.); you can betray previous allies or not, which changes how, when, and sometimes
whether you do various content; etc.
It's certainly not
as open-ended as it could be. You're generally going to see most of the same places, though not necessarily always, and there are scenes or places you can only see if you take certain paths. But there is agency there. You also have agency WRT your illithid powers and such, and the game actively recognizes this at various points (for example, there's a very difficult save...IF you've ever consumed any tadpoles to give yourself more powers. If you
haven't done this, I can't remember if it's automatic success or a near-trivial roll, but either way it's MUCH easier to resist a temptation/compulsion if you're "clean".)
I just wouldn't call any of that anywhere
close to a "sandbox"--but that's exactly what a "menu" of options is.
As a different example, the game
Wasteland 2 has both dialogue and story options, where choosing path A cuts off path B and vice-versa. I believe there are also dialogue options in there which influence the direction the game goes, I fear I never finished it.