Brand new Mac mini M1 running macOS Monterey 12.1, USB-A HFS+ stick.
The LG UltraFine 27UN83A-W monitor is connected to the Mac mini thru a USB-C cable.
When I set the Mac mini to sleep, I get different behaviors depending on the actual stick connection :
A) stick connected directly to the Mac mini => no error
B) stick connected to the LG UltraFine monitor hub => manually eject stick prior to going to sleep => no error, stick reappears on desktop when sleep ends
C) stick connected to the LG UltraFine monitor hub => "Disk not ejected properly" error when sleep ends / stick reappears on desktop (apparently undamaged).
When powering off, the stick reappears normally on the desktop without any error after powering on.
Clearly, having a hub on the connection path creates problems, likely because the hub is unpowered when the monitor goes to sleep after the Mac does.