Why 80CCD(2) still counts in the new regime
Section 115BAC, the new regime, blocks most Chapter VI-A deductions. Two salary items still change the tax for most people: the standard deduction, and Section 80CCD(2), which is your employer's contribution to NPS. Family pension and the Agniveer corpus can also remain. They do not appear in a typical CTC.
Your own extra NPS of ₹50,000 under Section 80CCD(1B) is outside the ₹1,50,000 Section 80CCE cap. You can claim it only in the old regime. Section 115BAC does not allow 80CCD(1) or 80CCD(1B).
The money under 80CCD(2) comes from the employer. You claim the deduction in your return. It is not inside the ₹1,50,000 Section 80CCE ceiling. If HR shifts taxable special allowance into employer NPS and keeps the same CTC, the new-regime tax can fall without you paying that amount from your bank account.