Welcome to HCM,
It seems that you have got some laxity of shoulder joint muscles giving rise to this problem.
There is rare possibility of having mild subluxation of shoulder joint.
Consult orthopedic surgeon and get investigated.
With treatment and physiotherapy
you will be alright.
Meanwhile you may take NSAID
for temporary pain relief.
For time being avoid Gym. or more straneous shoulder exercise.
Ok and bye.