Some ideas. Try each by itself first, then go down the line if the first doesn't help:
1/ Better warmups-several minutes of slow windmills in both directions, then light motions with weights. No hurry, do it right.
2/ Increase the intensity used, so that the weight used on presses is lowered:
i) Lower rest times between sets.
ii) Increase reps to 12-15 range.
iii) Pre-exhaust using another delt exercise first, to both warm up the delts before getting to the problem exercise and to exhaust the delts and reduce the weight used on presses.
iv) Compound super-sets or tri-sets.
v) Negatives, etc.
3/ Find variations of the same exercise that do NOT cause pain:
i) Smith machine presses using either full or partial ROM that eliminates the bottom portion-try both.
ii) Press to in front instead of behind head.
4/ Abandon the exercise, your body doesn't like it. Find other good substitutes that don't cause the problem.
5/ A cortisone shot will take care of the pain, which will return eventually, unless the cause of the pain is eliminated.