Maybe the external hard drive is put to sleep. Or, certain third-party app blocks or interrupts the external hard drive's connection. Moreover, the damaged port, system bugs, and the drive's file system corruption are also possible reasons make your external hard drive keeps disconnecting on your Mac.
Here I summarized some quick fixes, hope they can help you out with the trouble.
1. Check the sleep settings for the external drive
Go to Apple menu > System Preferences > Battery. Disable the "Put hard disks to sleep when possible" option.
2. Restart Mac
Restarting your Mac can exclude the temporary system glitch that causes your external hard drive keeps disconnecting from your Mac.
3. Try another port
You say that you've tried changing cables, unplugging other drives, and firewire cables. But you ignore connecting the external drive to another port on your Mac. The damaged port can also lead to this issue.
4. Boot your Mac in Safe Mode
Booting your Mac in Safe Mode is to check if the recently installed third-party software conflicts with this drive. If the hard drive still keeps ejecting on your Mac, jump to my next suggestion. If it is, uninstall your recently installed apps.
5. Update your Mac
This issue is reported that mostly occur in macOS Ventura, possibly a system bug. If you've upgraded to the latest 13, check if any minor updates are available and go ahead to update your Mac.
6. Reformat your external drive
It's hard to say that the disk is corrupted. If my above tricks can't change your situation, try to format the external drive on your Mac. Move all files on the drive to your Mac and then reformat the drive.
- Open Disk Utility in Launchpad > Other.
- Select the drive and click Erase.
- Set a name, format, and scheme (GUID) for the external drive and click Erase to let it start formatting.