This is a known issue when retrieving resources that inherit from DomainResource and have one or more contained resources. As these resources are unmarshaled from the database the exact type of the contained resources is not known, so they are unmarshaled into the generic interface{} type.
This unmarshaling operation names the fields in this interface{} exactly as they are in the database, meaning the id is actually _id, and the fields used to store the extension (@context, @id, @type) remain that way.
The _id field is corrected to id in the web layer before being returned to a client, but the extensions are not.