The judgment in a foreclosure proceeding under authority of section 2A:50-49 of this title shall adjudge that the mortgage shall not be deemed to be merged therein, but shall remain in full force and effect as security for the principal sum due thereon and accrued interest.
N.J.S. § 2A:50-50