Ex is trying to change my daughter's last name

My daughter is 16 and has been living with her dad and step mom for 2 years. She had to leave because she was accusing my boyfriend of some things and my daughter does have some mental health issues. I don't want to talk about that because it's not important. It's just why she lives with her dad. Her dad was not involved in my pregnancy with her at all. He actually blocked me and was telling people that I'm crazy and shit. His dad had twins with has new wife and baby mama number 4. I gave my daughter my last name because I wasn't married. He took his new wife's last name because she has kids that have her last name and he didn't want them left out or something. I found out my ex has petitioned the court to CHANGE my daughter's last name to his which is actually his wife's. I reached out to my daughter to ask if this was something she wanted and I was left on read. We have been having an on again off again relationship. I'm allowed to contest it because I am her legal mother but with her being 16 if he is manipulating her into saying she wants to do that then they could change her name and I don't know what to do. Especially if she won't talk to me. Advice?