Yes it would hinder the mega backdoor Roth IRA contribution. You will run into the pro rata rule until you pay the taxes and move it to Roth.
If you have access to the mega backdoor through your job, where you can convert that money to Roth within your 401k, that’s what I’d do. If that’s the case, your limit in your 401k will go to $66,000 (including match).
Note that the backdoor Roth IRA is external to your job. While the mega backdoor is through a brokerage account like Fidelity or Vanguard – unrelated to your employer’s 401k.