I have been working for a couple of weeks now without this eject warning except once when it happened when I connected my backup drive. There are two issues here. One is the quality of the adapter and the USB-C connections and the other is the power.
I solved the backup drive eject warning by powering it separately - Later I was able to drive the backup drive from my Macbook when I had no other connected devices and my Macbook was full charged - i.e. their was enough power from the power adapter to power the Macbook and the backup drive sufficiently. However, I had also upgraded the power adapter to a larger 67 Watt version.
The quality of the USB-C connection was solved by replacing 3rd party adapters with Apple adapters (and also replacing my HDMI cable to my monitor - although this may not be related to the eject warning but its also possible that is was one of the issues that added to the eject warnings as connection to the monitor was intermittent - maybe causing power surges - this is just a note to consider).
Now for the first time since buying my M1 I can leave my external drive (with my photos and imovie projects) connected all the time without worrying about improper ejects, and I can add my timemachine backup drive safely to the 2nd USB-C port so I can backup both my laptop and the external drive containing my projects. I hope this helps you. Good luck.