Backport of !6297 (merged)
Validation pipeline: https://gitlab.isc.org/isc-projects/bind9/-/pipelines/115893