That JS file doesnt use here to validate the field_2 (the confirm password field) on profile edit page. Can you post what error you see on the console? I am not able to reproduce this on my environment.
Custom Registration Form
Create online registration forms in minutes, no coding, zero hassle...