Vercel uses AWS Lambda under the hood. It’s possible your log statements are exhausting memory allocated per log line. Especially for orders with large amounts of data, or many line items.
Personally, I use their Log Drains to log to Cloudwatch instead. That way I have complete logs outside of their platform.
Additionally, you can try a tool like HookDeck as a middleman between Shopify and your webhook handler to view these order’s raw data to identify these kinds of data mismatching issues.