I spent some time searching, and couldn't find the answer written explicitly in IRS regulations.
What I did find was this chart from the irs showing that nonqualified distributions from a Roth 401k are pro-rated between contributions and earnings.
It is well documented that you can't withdraw any money early or tax free (even contributions) from a Roth 401k ("Designated Roth Account" in IRS parlance) that has made any money. source
You can do a direct rollover from a "Designated Roth Account" to a Roth IRA and the basis describing contributions vs. earnings is preserved. source
And there is plenty of evidence showing you can withdraw contributions from a Roth IRA without penalty. source
All that being said, I can't find anything from the IRS that says this is a legitimate strategy.