Getting a more specific diagnosis from a doctor would help to narrow down what can/can’t and should/shouldn’t help.
In general, do stuff that doesn’t hurt. For back training, neutral-grip chins/rows/pulldowns and dumbbell work where your hands can freely rotate should be less problematic.
Dr. John Rusin and Tony Gentilcore both have a ton of articles with drills and advice to keep the shoulders healthy. Pretty much anything from them should get you more on track, but again it’ll depend a little on exactly what’s wrong.
Absolute worst case scenario, if your shoulders need to go on total maintenence/repair mode for a while, you can basically go crazy with the squats and leg work. Sort of the reverse of when Ben Bruno had knee surgery years ago, so he became a pull-up machine and eventually nailed something like chinning double-bodyweight for reps.