This ensures that the best block is included in the backup which leads to a more consistent behavior when loading the backup.
This is a partial backport of core#30678
https://github.com/bitcoin/bitcoin/pull/30678/commits/7e3dbe4180cbeb65e59b53d9fa98509e9189549d
https://github.com/bitcoin/bitcoin/pull/30678/commits/037b101e808ccf9e717751619e04f6e87d614efd