C# HMAC verification for X-Genesys-Signature fails on Azure Function

How should I properly to verify the X-Genesys-Signature header in a C# Azure Function to prevent replay attacks? I am using HMACSHA256 with the shared secret, but the computed hash never matches the header value. The docs state: “Use the X-Genesys-Signature header to verify the request origin using HMAC-SHA256.” My code uses Encoding.UTF8.GetBytes(body) but I get a mismatch. dotnet 6.0