The best thing is to look at your itineary.
if it says cx then you should be credited regardless of the boarding pass. and you should send in your itineary along with the boarding pass when you request mileage. This is becasue the system has captured the ticket as BA instead of CX and requesting mileage now requires the proof of the itineary which orginally shows it as CX.
Actually these happen in some airports as the info screens only show example BA xx. instead of BA xx/CX xxxx. And since some flights got more than 1 codeshare, they cant list every flight.
The effiicient and smart airports will have the info screen show BA xx while on your boarding pass will show CX xxxx/BA xx, and someone else's might be AA xxxx/BA xx so the passenger who's not an idiot will look at the BA xx flight info on the info screens. But not all airports are "smart" that way.