Cherry pick commit [bd9ed68a0](https://github.com/cometbft/cometbft/commit/bd9ed68a0483f38afee88bbda0f3b41757a6d21f) from `release/v0.37.1` into `v0.37.1`