When replying to a topic in a restricted category, Discourse (very intelligently) shows you a warning if you @-mention someone who won’t be able to see the topic. It does, however, seem to be a little eager in doing so. For example, if you type @christine, it’ll warn you that she can’t participate – even if you’re just about to finish typing @christinejones, who can.
I think this is tied to the autocomplete popup appearing – the warning banner appears at roughly the same time.
One way to fix this would be to not show this warning until you enter a terminating character – a piece of punctuation or whitespace.
Could a newline not be considered a terminating character? Although that still wouldn’t resolve people leaving trailing @-mentions at the end of posts. (Although you could argue that such people are truly, truly awful !)
The autocomplete fix sounds like it could work well, but I imagine it’d be a bit more complex under the hood.