If you quit at the year you turn 55 or older you can take money out. You can always take money out but if you quit and then cash out you will pay a 10% early withdrawal penalty. You will also be taxes on everything you take out as income and not at the more favorable capital gains rates. If you have it in a Roth then if you hold it until 59-1/2 ( after having the account at least 5 years) you will owe zero taxes. My shares are split across a 401k rollover IRA, a Roth and a regular brokerage account.
Similarly I have a lot of years of work in a 401k. I have already looked at some options to roll it over should things go that way, but this is one of the big reasons getting with a good financial advisor is a top-level recommendation post-MOASS.
Yeah, if you got enough from the squeeze to retire early then 10% of that 401k may not look like a big deal, but why leave any money on the table?