I am no expert but apparently there is a sleep regression around 9 months, so it could be that, although are you giving pain relief only when she wakes up?
Teething can be worse at night, so I would try giving a dose at bedtime as that should work better than waiting until she is waking up in pain and then give a second dose if / when she wakes. Pain relief works better given early and regularly so gives it the best chance to work.
It sounds also as if she has become overtired, (as have you !) after being used to 12 hour sleeps recently and that can affect naps during the day as well in that she then won't nap as well in the day or at night either so it becomes a catch 22 if you see what I mean?
So I would try pre-emptive pain relief at bedtime and if she wakes for a few nights to see if things improve over a few days.
Hope that helps and you get some better nights soon x
Sorry forgot to add you can also alternate Ibuprofen and Paracetamol for maximum pain relief depending on timing and if she is not allergic or anything. I also would not give Ibuprofen on an empty stomach.