Maybe Mileage Plus is different to other *A programs in this regard, but normally to get credit on codeshare other than a codeshare for the airline of the FFP, it has to be both a *A codeshare and operated by *A airline. Whereas on OW programs it seems to work differently - normally if codeshare is OW then get credit.
Some made up examples (only because I can't be bothered hunting through my records for real examples) for credit to LH Miles & More.
If on LH codeshare operated by say TN (non *A) then get redeemable miles but not status miles (redeemable due to the LH codeshare but not status because not operated by *A).
If on LH codeshare operated by say BD (*A) then get both redeemable miles and status miles, but no FTL/SEN/HON bonus (redeemable & status because on *A metal but no status bonus or HON miles because not operated by relevant airline).
If on NZ codeshare operated by say BD (*A) then get both redeemable miles and status miles.
If on NZ codeshare operated by say TN (non *A) then get no miles (because not either a LH code OR operated by *A).
--