It's not just SanDisks, its pretty much anything you plug in as an external drive or at least I've found it so. I have a 2GB SanDisk Extreme SSD and a Transcend 1GB HDD plugged into my M1 MBP full time as backups that are constantly ejected by the system and I had the same problem with my previous Intel MBP. I had hoped with the new silicon Macs this issue would be resolved but sadly no luck. I have had to revert to the same solution I used with my Intel Mac, that is running Amphetamine. Believe me I have tried everything with sleep settings and Energy saver to no avail, this solution is the only one that works for me.
It is free on the App Store and essentially prevents your System from going to Sleep. It sends a tiny bit of data to the CPU on a regular basis just enough to prevent the CPU from ejecting peripheral drives.
Here are the settings I use from the menu bar;
As you can see it allows display sleep in the normal way. I have set the Session to be "Indefinitely" so I merely turn it on/off from the menu bar and leave it on all the time. It is a Login Item so it starts the minute I startup my device. As stated I have used this on a previous MBP and on my 4 year old M1 MBP with absolutely no problems caused. Once on I hardly ever even look at it except for the notification which comes up on Startup from Off that tells me it's on.
You will see other Apps with the same function and claims, I have tried most of them and none work as well as Amphetamine. If you try it and have any questions about setup don't hesitate to ask. It does have an number of additional functions which I do not use.
As below;