Why don't drop shadow styles applied to images appear incorrectly when the image is replaced?

Hi guys!

I have a question regarding drop shadows styles applied to images. So I have placed an image in a frame and applied an effect style consisting of 3 slightly different drop shadows to the image itself and the shadows appear correctly. (left frame) The problem occurs when I replace the image with another one with a different ratio and set its fitting to “fit”. (right frame) The shadows seem to be appearing according to the ratio of the old image and obviously incorrectly.

Do you guys have any ideas regarding this one?
Thanks in advance and have a nice day everyone!