I have the same problem and had it not with an elgato docking station.
If I close my macbook pro, the external device works for a couple of seconds and then the login screen appears. I typed in my credentials and it works again for a couple of seconds and the issue repeat.