Since macOS High Sierra (maybe even Sierra) I started having trouble putting my iMac (mid 2015) to sleep. After installing clean Mojave system the problem didn't go away, even after jumping through various hoops and trying to disable every software which might be causing it.
After entering sleep mode the computer did DarkWake unexpectedly. Usually within one minute after sleeping. This was especially annoying because my external drives would spin up at that point.