Most airlines already have vastly different baggage rules for different seat classes so I doubt this really needs to be determined by the flight number.
I feel like you have it backwards: that's exactly the point. You buy the flight under the code share flight number, and you buy the seat class based on the code share airline's (not the operator airline's) seat class name. Then the code share airlines baggage rules for that seat class flow into that.