… which means that apps that are working on any kind of modern device can't rely on this behaviour, and thus can't generate passwords or other account critical secrets using this method. Apps written for modern Android phones can't use the IMEI for any legitimate purposes anymore, unless the device is rooted or the IMEI is exposed in some other unofficial way.
That's still a majority of devices where you can't assume that the IMEI is available. I'd argue processing the IMEI for legitimate purposes (i.e. generating device passwords) is not something you should rely on and instead you should come up with a solution that works in both cases.
It still works fine if your intent is to stalk users, though.