You have to target the block, instead of the general element. You can find the block with a chrome plug in.
https://chrome.google.com/webstore/detail/squarespace-collectionblo/bggpdfnccodbnmcndckmeehdjkjojkde?hl=en-US#:~:text=Squarespace Collection%2FBlock Identifier&text=This extension makes it easy,the ID to your clipboard. So the code would look something like this with your unique id on the first line:
[data-image-id="548969e9e4b05708750ebe59"]
{ filter: drop-shadow(5px 5px 8px #000000);
}