What exercises should someone refrain after dislocating a shoulder?

No easy answer... . Many patients who suffer from shoulder dislocations will benefit from rotator cuff strengthening exercises, as well as exercises of the muscles around the shoulder blade or scapula. Unfortunately, despite adequate strength your shoulder may still dislocate :-(.
Anterior Dislocation. Most shoulder dislocation occurs when the humeral head moves anteriorly. Following an anterior dislocation avoid exercises that put your shoulder in a vulnerable position. For instance tricep dips push the humeral head forward due to the fact that you have to reach behind you... Also when performing lifts such as push-ups/ bench your elbows should not bend more than 90 degrees.