I think it depends alot on the game and the studio. I remember watching an interview with Ashley Burch who describes a situation very similar to the one you describe when she was working on on Horizon Zero Dawn. Other games more reliant on motion capture, like TLOU, the VA's seam to be more involved and aware of what thier working on. Security and preventing leaks to press also seems to be a varying concern. The VA for Aerith in FFVII Remake is a professional actress, but also has a long running gaming YouTube channel called "Strange Rebel Gaming", so I can only imagine what that must of been like for her to know what the part was and not be able to tell anyone due an NDA. Obviously, she was allowed to reveal the truth eventually.
Overall, I feel like this varies greatly between studios and thier publishers because of differences in security protocols, methods of capture and how studio's write scripts. However, I do think the old days of VA's being given a booth, a script and a stern request to not ask questions are starting to fade.