What would you call someone that accuses you of being racist due to a comment that is not racist in anyway?
You may find some of the phrases in the following excerpt relevant. From Psychology Today:
As infants turn into children and children into teenagers, some people acquire other racial accroutrements [sic] like a race filter through which all their experiences are seen or various sizes of race chips that sit on shoulders burdened by a life of slights, insults, discrimination and outright hostility.
The problem with the race card is that noone [sic] is allowed to use it. When a white person suggests that a black person is using it, the white person is accused of being 'in denial' about race, racism, discrimination and history. When a non-white person uses it, they are accused of defaulting to race as an 'excuse' for whatever it is that transpired. Noone [sic] can win with the 'race card' and yet there it is: Ready to be 'played' and everyone in fear of what will happen when it does get played.
It would appear that the characters in your two examples are displaying race filters or carrying race chips, resulting in their playing the race card.
Note: A community member added the single-word-request tag to OP's question after I posted this answer.