i find a lot of times those filters are different sizes, never gave it much thought but when you think about it you have a point about genuine parts.
i suppose manufacturers will have more than one supplier for some parts and that would partially answer it but why not stipulate exact sizes as i would have thought they would.... have they both got bmw written on them? part numbers into google should bring up something.
i bought a full set of those cup sockets so i can cover any oil filter for about 20ish pounds of ebay and so far no problems.
money aside i wouldn't really panic about a non genuine filter, especially on a bike where they get changed long before they do a lot of miles.
back in the day toyota was the only car which really needed the genuine filter as they had a valve to hold oil in the filter itself, and really thinking about it, this was probably over engineering, which i like but see less and less these days.