It sounds to me like the device is completing the shutdown process but not actually powering down when it is done. Since it happens inconsistently, I would first check for BIOS updates and then check the power settings in the BIOS.
I also had/have the problem that my system sits with a black screen while shutting down. I can reproduce it when having the Battle.Net App open while shutting down or closing it just seconds before shutting down which means that some of its process seems to hang when it is closed.
How long do you give your system in that state? Because mine always powers off like it should after about 2 or 3 minutes which feels like ages compared to the almost instant power off in a normal shutdown.
I’ve had a similar problem historically, it was due to making a change in the BIOS, I think it was related to ErP? Try enabling/disabling ErP in your BIOS and that should hopefully resolve it. Beyond that, a BIOS reset to defaults gives you a baseline to work with.