I've never tried to drag a mounted volume onto the Finder's sidebar. I'm guessing by doing that you are creating a permanent item on the sidebar. I would try to toggle the Finder's sidebar settings for removable media off....delete the folder for the external drive (make sure that drive is not currently connected), then turn the removable media setting back on to see whether that restores the basic functionality.
You can try checking the System Preferences to see whether you can "prevent hard drives from sleeping" which should be in the Energy Saver System Preferences. Don't know if this will help.
If the external drive disappears from the sidebar again, make sure to give it time to go ready again since some drives may take a while to wake up. Also try connecting those drives directly to the Mac since that can make a difference. Also try disconnecting all external devices other than the one drive to see how it behaves.
Try booting into Safe Mode to see if that makes any difference. Unfortunately Safe Mode will be a bit more limited where some apps & devices may not work properly if they require any drivers (aka extensions) to be loaded. If this works, then you most likely have some third party software installed which is interfering with the normal operation of macOS.
Are you saying you have more than one external drive, but only one drive behaves this way?
What file system is being used on the external drives with this issue?
What is the make & model of this external drive?
In case this is just a Finder preference issue instead of an actual issue with external devices, then you can try deleting the Finder .plist preference file in case it is corrupted. After deleting this file you will need to log out of the user account, then log back in so a new default preference file is created. See if that makes any difference.
If nothing helps, then you can just put a folder to the "/Volumes" folder onto the sidebar. Clicking on this will show you all mounted volumes so you can quickly get to those which are not displaying properly on the sidebar. Not ideal, but it may be good work around at least while you troubleshoot the issue.