I measured the performance of different size direct I/Os on some Samsung SSDs, and the write performance when switching from one test to another was significantly affected by the previous test parameters, or not, depending on whether a "sleep 2" was inserted between each test.
The only explanation I can think of is that the flash reorganises or commits cached data during that 2 seconds.
That would be a power failure. Kernel crash is not equivalent to that.
System reboot doesn't entail power failure either. The disks may be powered by an independent external enclosure (e.g. JBOD). All they see is that they stopped receiving commands for a short while.
That said, macOS does issue a flush on kernel panic, and I'm hoping to be able to do the same on Linux.
Probably not on lockups though. A watchdog reset won't flush NVMe. Not sure if they have a special pre-fire path that tries a last ditch NVMe flush...