Caught this bug as well. Discussing here https://github.com/ClusterLabs/resource-agents/issues/1491
Fedora ships pidof with procps-ng (procps on Debian) and does not have such problem. Debian ships pidof with sysvinit-utils which have this problem (skipping D and Z processes). There is no way to have pidof find D processes on Buster. On Testing there is -z option but that also includes Z and there is a note that with -z pidof can hand. I'd propose to look at pidof from procps (Debian builds procps with "--disable-pidof"). And what about Buster? Is it stuck with broken pidof?