Can anyone help me fix this?

I’m trying to create a phone number input screen which adds a dash after the third number, (which is working) but then it erases the dash once I hit the fourth number. Anyone know how to fix it?

troubleshooting.pie