That would still be your free will. You'd still be presented with a choice:
A) Don't do the thing you don't want to (Vaccination)
- or -
B) Don't do the thing that having a vaccination would let you do.
That's still freedom of choice - you're free to decide what you want more. Having constraints on you isn't removing your free will.