The plan accounts for the Roth/pre-tax funds separately. Each plan can set up its own rules for how withdrawals are made (eg pro rata across accounts; Roth first; pre-tax first; etc.). Many will let you choose which account to withdraw from.
Those rules may be clear from the withdrawal form; otherwise ask your plan administrator.