A list of successful iMac 27" (2012-2019) SSD upgrades
The iMacs before 2017 have issues with the drive's power states after upgrading the blade SSD with a non-Apple NVMe. The iMacs above marked in BLUE will crash when waking from hibernation, self restart with two start-up chimes. The iMac models marked in ORANGE will either "restart because of a problem", or show a folder with question mark icon (depending on the system event produced).
Until Apple patches the bootrom with the full NVMe driver that 2017 and 2019 iMac models have, the only way to prevent your iMac from crashing is type the following command in Terminal:
For Late 2015 iMacs (disabling normal sleep) -> sudo pmset -a hibernatemode 25 standby 0
For Late 2012 until Mid 2015 iMacs (disabling hibernation) -> sudo pmset -a hibernatemode 0 standby 0 autopoweroff 0
(for the models in blue, alternatively, instead of standby 0, you can leave the standby at 1, and use for example standbydelayhigh 2592000 which equals to one month in seconds)