```
The sync calls are redundant after a call to generate, because generate
already syncs itself.
```
Completes backport of [[https://github.com/bitcoin/bitcoin/pull/23474 | core#23474]]:
https://github.com/bitcoin/bitcoin/pull/23474/commits/fa974f1f1417a536636347072e86bcb54a4c909c
Depends on D12533.