I was one year into the PhD program before quitting and going into dental school. Most schools didn't really care that I was quitting. I went to a couple of interviews, and none of them asked about it. Just do it secretly and don't let your PI know.
It's your life. You do what you want with it. No one can tell you that you have to do this or that.
Specializing is about how well you do relative to your dental school class. Having a masters helps, but grades and rank count for a lot more.
I would check the fine print like the poster above said. Some master's programs might require you to finish, and some dental schools may need you to finish all planned coursework. You never know. Air on the side of caution.
Just an addition. If you stated on your dental school application that you will be starting a Master's program and they accepted you based on that information, not completing your Master's will reflect poorly. I'm not sure if it will be grounds to rescind an acceptance offer, but you should definitely check with your program director and the dental school.