Unfortunately, I do know of an example. It’s unfortunate because it is, to my mind, one of the most indefensible things Paizo has ever wrote, but it does land adjacent to this question. Spoilers for near the end of Wrath of the Righteous, but considering what I’m spoiling, you may be better off forewarned and avoid the adventure altogether.
Also note that this scenario was written by James Jacobs, Paizo’s creative director, and he has defended it at length—so it would seem that this is very much considered canon by the person who is in charge of the setting’s canon.
Towards the end of the adventure, the “Lawful Good” goddess of justice and valor, Iomedae, teleports the player characters to an undisclosed location where they are nearly blinded by her presence, and begins to question them about their intentions. Each of these questions is explicitly a trick question, and Iomedae has extremely specific things she is expecting in how the characters answer. Anything but those answers results in a blast of no-save sonic damage. If they are disrespectful, she makes them deaf and mute and beyond all mortal healing. If the characters make an attempt to defend themselves, she forces their alignment to Chaotic, or Chaotic Evil if that defense includes any physical or magical attack on her, and then flinging them each to separate random corners of the Material Plane.
This is not exactly the same as using alignment-specific damaging spells, and as a goddess, she doubtless knows the characters’ alignments anyway. But it does show that a character who is supposed to be “justice incarnate” has absolutely no objection to damaging, and even mutilating, characters of other alignments, outlooks, or opinions.
On the other hand, this scene involves “justice incarnate” kidnapping, interrogating, and potentially torturing characters for no other reason than their disagreement with her. It would absolutely be a violation of the Geneva Convention in the real world, and the adventure labels the victims as the ones that are “chaotic” and/or “evil” if they have any objections. According to the adventure, the torturer here literally defines what it means to be good and lawful and just—in other words, according to the adventure, torturing people for mere differences in opinion is good and lawful. In short, if we accept this precedent, we have to accept that in Golarion, “good” and “evil,” “order” and “chaos” have absolutely nothing whatsoever to do with any real-world notion of those concepts.
The nominal purpose of this exercise is to determine the characters’ suitability for a mission. There are high stakes, and timelines are tight, which might have otherwise arguably justified some unpleasant behavior, but with the resources the torturer otherwise has at her disposal, that all flies out the window. According to this precedent, using damage to determine alignment is acceptable even when other alternatives are available or even more convenient.