Bug
Accept: application/xml falls back to JSON. Only application/fhir+xml triggers XML output. The generic MIME type should be accepted as an alias per the FHIR spec.
Repro
curl -s -D- 'https://tx-dev.fhir.org/r4/CodeSystem/$lookup?system=http://hl7.org/fhir/administrative-gender&code=male' \
-H 'Accept: application/xml' 2>&1 | grep -i content-type
# Returns: application/json; charset=utf-8
# Expected: XML response
Spec reference
R4 section 2.21.0.6: "FHIR resources can also be exchanged with application/json and application/xml."