The only reason you should be concerned that you have to patch your behavior is because your normal banter with friends includes insensitive stuff! If there is a genuine interest in being actively anti-racist, then call out your peers that want to bee-line conversations into frustrations about minorities. Or that are always looking for excuses to use the N word because it sounds cool (or trying to be actually racist). When - logic aside - you know normalizing that grammar would require constant patching around other people.
Another thing that underlies this code switching, for a lot of people, is an irrational fear of being beat up any black person in the vicinity, or even worse "cancelled". For the former, I consider that an entirely racist assumption, people don't want a record or a ruined day over some slip up in grammar or a troll. For the latter, try not to do it on twitter, you'll be fine.
So if you need to, you should consider patching your default conversational behavior so that you don't have to patch it around black people. If you don't need to that, then just assume it's all in your head, just like I assume its all in my head when different mormons are being awkward to me specifically despite knowing what their religion teaches about people of color. Everyone is just trying to go about their day without wondering why anyone is being awkward around them exclusively.
Right on.
As to the rest... I don't use the n word and I can't remember the last time I heard a friend of mine use it (if they ever have). I'm not afraid of being beat up by black people--certainly not in a professional context! And yes, I'm aware that in-person interactions are much less likely to result in cancellation haha. So I guess I'll take your advice of just assuming that it's in my head. It usually goes away when I spend enough time around someone regardless.
Anyway, take it easy.