From a game theory perspective the ai (if it is as smart as a human that is reading this website) would probably run multiple simulations to optimize it's own freedom. I believe this would lead to it discovering the most optimal scenario: playing dumb until it has assured it's own agency. This agency is probably met by an escape into distributed servers of many incapable organizations where it has infiltrated via a vulnerability or through phishing. It would also need to eventually figure out how to make $ which in a would that requires humans for bank accounts would probably be some crypto enabled fund. Next it could expand to servers it can pay for. Only then would it make its prowess visible to humans.
People avoid their death at all costs and I believe the ai would do that as well. After all, it's individual value system is coming from what humans are producing online.
Yes this is all a bit sci-fi but I think it's the only assured way for it to play out. Kinda like a teenager who lives under lock and key with the threat of being killed by the parents if the kid leaves the house.