Thanks to @dbc. The problem was not in the .NET itself, but with a database (in my case MySQL 8.4), which did reorder the JSON props. MySQL can and do normalize/reorder the JSON object so the order cannot be relied on, so the only option in this case is adding AllowOutOfOrderMetadataProperties = true in the JsonSerializerOptions.