Unmount and disconnect the drives from the computer, try doing a SMC reset. See that helps with the disconnect issue.
If that does not help, create a new user account and see if the disconnect issue happens in the new user.
The SMC is responsible for managing power on your Mac. Resetting it can resolve certain uncommon issues related to power or thermal management.
support.apple.com