See https://github.com/civicrm/civicrm-core/pull/25123 and https://github.com/civicrm/civicrm-core/pull/25482