I would say his free will is not restricted
His decision making options are restricted but those decisions are just as much a product of his past as the ones we make out of prison, he's still acting entirely based on external and internal forces
I'll put it this way, if you were to make an exact copy of our universe at this moment and watch both of them play out, he'd almost certainly make the exact same decision both times, same applies to someone out of prison
My point isn't that people don't practically have agency in the decisions they make, because they obviously do. We just don't know all the forces that influence that decision and it's not useful to think about that, so we call it free will
IIRC that's the whole point of flatpak, snap and appimage
Docker can probably do it too, distrobox puts a useful wrapper on that
Nix does that kind of, nix packages aren't isolated in that they can't access resources on your system but all dependencies are stored in the nix store, hashed and isolated from eachother, and wiped when you collect garbage