Intentions can be very nebulous. We are not always aware of why we’re doing something and tend to come up with explanations after the fact. These can even change over time. Ultimately we can only guess at what happens in other people’s minds.
Alternatively we can look at the effects of an action. To use your example, when someone says “all lives matter” it, among other things, alienates black people. IMO makes it a lot more clear cut.