BA obviously had discussions with the UM's parent/guardian before the flight or at time of booking.
So why cant the policy be that during that discussion you ask the parent if they object to their UM sitting next to a male travelling on their own?
How many parents would actually say "yes i object, please sit them next to a female"???