Source: Pathfinder 2e Gamemastery Guide
Transcription:
A screenshot of plain text, reading:
The Experience Points gained for besting an NPC depend on how the party overcame them, because XP comes from overcoming a specific challenge. If the PCs defeat the NPC in a non-combat setting of the NPC’s specialty, the party gets XP based on the NPC’s non-combat level. If they just beat the NPC up, the XP would be based on the NPC’s creature level. Quite often, that means 0 XP and failure at the PCs’ objective; for instance, during a baking contest, if the PCs murder the other baker, not only would they be disqualified, but the would likely be apprehended for their crime.
You would then have to have someone impersonate the dead baker during the competition, or the murder would no longer be secret. You’d be on the short list of suspects, no matter how good your disguise. I think mind control would be a more practical solution. Just make it impossible for them to win, without getting arrested.