Well, whether we like it or not, we cannot ignore the fact those biases exist and are still common in society, so inevitably some of it will sneak their way into the world of football and other sports.
I don't have any doubt there are efforts done by the football clubs and the different sport authorities to screen their referred in search of anything which could point out towards so bias against a specific nationality or race, but in the end people can simply lie about what they think or what they have done.
Perhaps that is why social media and digital footprints have become more relevant today than before, people can really dig out much of the past of others by using search engines, many racist and xenophobes have been caught that way before and will probably continue to be caught in the future.
I personally think that all decisions made by referees with such bias should be annulled and the game must be replayed at another time and with a different referee, obviously. I understand that setting such a rule would be not easy for all referees around, but only this way we save people from avoiding some games because of fear of possible racism by a sports referee.