“The problem comes from vendors who flash the same exact firmware with the same EDID to multiple monitors in the same batch.”
Vendors flash identical EDID data onto every monitor in a batch. macOS then cannot tell two screens apart and swaps them after sleep. Some monitors claim to support input switching and just blink. Hardware makers ship broken firmware and leave a solo developer to write the workarounds.